History log of /external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2c3e0051c31c3f5b2328b447eadf1cf9c4427442 06-May-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master LLVM for rebase to r235153

Change-Id: I9bf53792f9fc30570e81a8d80d296c681d005ea7
(cherry picked from commit 0c7f116bb6950ef819323d855415b2f2b0aad987)
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
4c5e43da7792f75567b693105cc53e3f1992ad98 08-Apr-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master llvm for rebase to r233350

Change-Id: I07d935f8793ee8ec6b7da003f6483046594bca49
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
ebe69fe11e48d322045d5949c83283927a0d790b 23-Mar-2015 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r230699.

Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
37ed9c199ca639565f6ce88105f9e39e898d82d0 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r222494.

Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
4adba52570723c2e1654b1c01feddf759893f096 19-Nov-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Simplify a few more explicit constructions, underconstrained types, and make DIType(MDNode*) explicit like all the other DI* node ctors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
17a88a7e8b8ad2f0766c4099d09cd29229296352 17-Nov-2013 David Blaikie <dblaikie@gmail.com> Remove unnecessary temporary construction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
fbf70b383d170e00d5104b22f1bda604214d6c30 17-Nov-2013 David Blaikie <dblaikie@gmail.com> Remove redundant explicit default initialization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
08e51e1d97e4dd2e5a0b4539da186869916ae5c3 17-Nov-2013 David Blaikie <dblaikie@gmail.com> DwarfCompileUnit: Add type safety to createGlobalVariableDIE

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194979 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
1dc27239969889661115f40b293c83ab9ff3efd5 16-Nov-2013 David Blaikie <dblaikie@gmail.com> DwarfCompileUnit: Push type safety of DIDescriptor through CompileUnit::createAndAddDIE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
21c9708c0909a4373d04f0910ab0cb05b94f25ef 16-Nov-2013 David Blaikie <dblaikie@gmail.com> DwarfCompileUnit: Remove unnecessary OwningPtr<T>::get() call

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
87fd14d9b52079828c5db4e1e4878046a7488f81 16-Nov-2013 Eric Christopher <echristo@gmail.com> For dwarf4 use the correct form for referencing debug_loc locations,
and update test cases accordingly.

This doesn't affect the output dumped using llvm-dwarfdump, but
readelf does now dump the debug_loc section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
942431fa710f186f11538eebdf3dc4a6b824a6ba 16-Nov-2013 David Blaikie <dblaikie@gmail.com> DwarfCompileUnit: Add type safety by using DICompileUnit rather than raw MDNode* for the CU metadata node

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194893 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
aedaa723c26c33d4f9497a79d9d74a3c197fa262 16-Nov-2013 David Blaikie <dblaikie@gmail.com> DwarfCompileUnit: Simplify getLanguage() calls to use existing member function

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
6bc810a49983e12006ba7a0dba61f7b2534b8f26 16-Nov-2013 Adrian Prantl <aprantl@apple.com> Replace the dangling context hotfix with an assertion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194883 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
cbc85a270d2546c49fc09f700687de2ecd46bd87 16-Nov-2013 David Blaikie <dblaikie@gmail.com> DwarfCompileUnit: Push DIDescriptors through a getDIE/insertDIE

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
86a33487376848a606fdc629ffce2a581ae45653 15-Nov-2013 David Blaikie <dblaikie@gmail.com> DwarfCompileUnit: Push DIDescriptor usage out from isShareableAcrossCUs

This is the first of a few similar patches. We'll see how far it
goes/makes sense.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
0cbdb81de76274c3f1731d92dc09864d2277d690 15-Nov-2013 Adrian Prantl <aprantl@apple.com> Reimplement r194843 in a slightly less broken way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
7d5f2bd5f9615c0f20d3a1f75ec01452d813283b 15-Nov-2013 Adrian Prantl <aprantl@apple.com> Restore the behaviour from before r194728.
If getDIE() fails, getOrCreateContextDIE() should also return the CUDie.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
7b641815290f34f0212e4cb7b26ed1708270cb97 15-Nov-2013 Eric Christopher <echristo@gmail.com> Use a reference rather than a pointer as we don't expect a NULL
DbgVariable.

No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194761 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
41e1a18885b8ef29219b7102ad25cd480c4a3f55 14-Nov-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Simplify/narrow null-check for getOrCreateType

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
8c0fecc39fe7f0928a7592104b4419022ad4b54e 14-Nov-2013 David Blaikie <dblaikie@gmail.com> DwarfCompileUnit::getOrCreateContext: Return the compile unit DIE rather than null.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
f4837be7c1d8f2a9e90100e849b148eb86a2d27e 14-Nov-2013 David Blaikie <dblaikie@gmail.com> Remove unnecessary 'else' after return.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
953398916cfd6ee035f6f4bd2dde25c21cdde1fe 11-Nov-2013 Eric Christopher <echristo@gmail.com> Unify the adding of enumerators with the construction of the enumeration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194401 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
6129002232c3dda7ca4ef95bba77a829ddf241f4 11-Nov-2013 Eric Christopher <echristo@gmail.com> Formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194400 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
62af0c295a7e79384305557985d09de85916b4b5 11-Nov-2013 Eric Christopher <echristo@gmail.com> 80-col.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194399 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
883ed6bd9544e7fac36a66711132bf151fb734ad 11-Nov-2013 Eric Christopher <echristo@gmail.com> Just pass the DIComposite type by value instead of by pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194398 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
9b93392185d3838cc438629981d7c3fee634176d 01-Nov-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Emit member variable locations as data instead of expressions in blocks

Drive by space optimization. Also makes the DIEs more regular which
might speed up DWARF parsing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193835 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
b8b70e10a2b3f252314e0d176379778fe8f3b582 31-Oct-2013 Manman Ren <manman.ren@gmail.com> Debug Info: remove duplication of DIEs when a DIE can be shared across CUs.

We add a map in DwarfDebug to map MDNodes that are shareable across CUs to the
corresponding DIEs: MDTypeNodeToDieMap. These DIEs can be shared across CUs,
that is why we keep the maps in DwarfDebug instead of CompileUnit.

We make the assumption that if a DIE is not added to an owner yet, we assume
it belongs to the current CU. Since DIEs for the type system are added to
their owners immediately after creation, and other DIEs belong to the current
CU, the assumption should be true.

A testing case is added to show that we only create a single DIE for a type
MDNode and we use ref_addr to refer to the type DIE.

We also add a testing case to show ref_addr relocations for non-darwin
platforms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
1d36113c05e611c0fba9b872b5f03eca9848bd69 30-Oct-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Push header handling down into CompileUnit

This is a preliminary step to handling type units by abstracting over
all (type or compile) units.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193714 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
3eabc2adb7387c97da547e250997ed0a8d5e6d3d 29-Oct-2013 Manman Ren <manman.ren@gmail.com> Debug Info: support for DW_FORM_ref_addr.

To support ref_addr, we calculate the section offset of a DIE (i.e. offset
of a DIE from beginning of the debug info section). The Offset field in DIE
is currently CU-relative. To calculate the section offset, we add a
DebugInfoOffset field in CompileUnit to store the offset of a CU from beginning
of the debug info section. We set the value in DwarfUnits::computeSizeAndOffset
for each CompileUnit.

A helper function DIE::getCompileUnit is added to return the CU DIE that
the input DIE belongs to. We also add a map CUDieMap in DwarfDebug to help
finding the CU for a given CU DIE.

For a cross-referenced DIE, we first find the CU DIE it belongs to with
getCompileUnit, then we use CUDieMap to get the corresponding CU for the CU DIE.
Adding the section offset of the CU with the CU-relative offset of a DIE gives
us the seciton offset of the DIE.

We correctly emit ref_addr with relocation using EmitLabelPlusOffset when
doesDwarfUseRelocationsAcrossSections is true.

This commit handles the emission of DW_FORM_ref_addr when we have an attribute
with FORM_ref_addr. A follow-on patch will start using ref_addr when adding a
DIEEntry. This commit will be tested and verified in the follow-on patch.

Reviewed off-list by Eric, Thanks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193658 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
d498e5e960f237d3eb04ad7680bd093d1954c7fe 29-Oct-2013 Manman Ren <manman.ren@gmail.com> Debug Info: instead of calling addToContextOwner which constructs the context
after the DIE creation, we construct the context first.

Ensure that we create the context before we create a type so that we can add
the newly created type to the parent. Remove last use of addToContextOwner
now that it's not needed.

We use createAndAddDIE to wrap around "new DIE(". Now all shareable DIEs
should be added to their parents right after the creation.

Reviewed off-list by Eric, Thanks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
ffc7dca885151ed42642c2d6733e8db75d276621 29-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Add a helper getSymbol to AsmPrinter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193627 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
6b713800ff03fdbb1d770d1e00af0e76041f3c03 29-Oct-2013 Manman Ren <manman.ren@gmail.com> Debug Info: instead of calling addToContextOwner which constructs the context
after the DIE creation, we construct the context first.

This touches creation of namespaces and global variables. The purpose is to
handle all DIE creations similarly: constructs the context first, then creates
the DIE and immediately adds the DIE to its parent.

We use createAndAddDIE to wrap around "new DIE(".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
bbdd02cc303d0f38f7739b64f419d645ca17b533 29-Oct-2013 Manman Ren <manman.ren@gmail.com> Debug Info: use createAndAddDIE for newly-created Subprogram DIEs.

More patches will be submitted to convert "new DIE(" to use createAddAndDIE in
DwarfCompileUnit.cpp. This will simplify implementation of addDIEEntry where
we have to decide between ref4 and ref_addr, because DIEs that can be shared
across CU will be added to a CU already.

Reviewed off-list by Eric.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
1a5e787f701c45ac2487d400faf6f6d4def6dcef 29-Oct-2013 Manman Ren <manman.ren@gmail.com> Debug Info: add a helper function createAndAddDIE.

It wraps around "new DIE(" and handles the bookkeeping part of the newly-created
DIE. It adds the DIE to its parent, and calls insertDIE if necessary. It makes
sure that bookkeeping is done at the earliest time and we should not see
parentless DIEs if all constructions of DIEs go through this helper function.

Later on, we can use an allocator for DIE allocation, and will only need to
change createAndAddDIE instead of modifying all the "new DIE(".

Reviewed off-list by Eric.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193566 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
be87b69a5f2f0b66939cef4d107a2cb8e4f4f4dc 24-Oct-2013 Manman Ren <manman.ren@gmail.com> Debug Info: code clean up.

Since we never insert DIE for DITemplateTypeParameter to a map, there is no need
to call getDIE in getOrCreateTemplateTypeParameterDIE. It is also renamed to
constructTemplateTypeParameterDIE to match with other construct functions
in CompileUnit.

Same applies to getOrCreateTemplateValueParameterDIE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193287 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
a1d25b6360a6f40bf1c5651950226640211dc6d0 24-Oct-2013 Manman Ren <manman.ren@gmail.com> Debug Info: code clean up.

Rename createMemberDIE to constructMemberDIE to match other construct functions
in CompileUnit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
99addee7335441fe9bb6249eb9d5332cdbdf3c97 24-Oct-2013 Manman Ren <manman.ren@gmail.com> Debug Info: code clean up.

Remove the unneeded return values from createMemberDIE, constructEnumTypeDIE,
getOrCreateTemplateTypeParameterDIE, and getOrCreateTemplateValueParameterDIE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
950f4e82afe9459457ce3f655ecb40fb64f761d9 24-Oct-2013 Manman Ren <manman.ren@gmail.com> Debug Info: code clean up.

Unifying the argument ordering of private construct functions in CompileUnit to
follow constructTypeDIE(DIE &, DIBasicType),
constructTypeDIE(DIE &, DIDerivedType), constructTypeDIE(DIE &, DICompositeType),
constructSubrangeDIE and constructArrayTypeDIE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
250f4e8ec22175dcc121e81c9b270065e7b94677 24-Oct-2013 Manman Ren <manman.ren@gmail.com> Remove {} from one-line block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193276 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
ef2d919f7f767b9d70bc44c4ac918b0a6b540cac 21-Oct-2013 Eric Christopher <echristo@gmail.com> Fix up some old review feedback.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193095 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
770530babc78e444bb6d0aadc87702ef138293fd 21-Oct-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Put each kind of constant (form, attribute, tag, etc) into its own enum for ease of use.

This allows various variables to be more self-documenting and easier to
debug by being of specific types without overlapping enum values.

Precommit review by Eric Christopher.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
53c9e5fbb9492824adfa1b004c198236fba1a93b 19-Oct-2013 Benjamin Kramer <benny.kra@googlemail.com> Remove unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
6efc043f0ba88d8415e729c63a27e886fb64830f 19-Oct-2013 Eric Christopher <echristo@gmail.com> Reformat.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193024 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
0ab6439c3f0eef28b4b40f31f2d4d9732fe8cd15 19-Oct-2013 Eric Christopher <echristo@gmail.com> Fix up a few minor performance problems spotted in code review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
630c3264a650af8e74f2b0b5ae7b57a17cb52061 18-Oct-2013 Manman Ren <manman.ren@gmail.com> Debug Info: add a newly-created DIE to a parent in the same function.

With this commit, all DIEs created in CompileUnit will be added to parents
inside the same function. Also make getOrCreateTemplateType|Value functions
private.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
57a964bc635359b97340b57510df4ebaf506806b 18-Oct-2013 Manman Ren <manman.ren@gmail.com> Debug Info: simplify code a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
9198657e1eb13ab717248cfacb2b504fd7e72719 17-Oct-2013 Eric Christopher <echristo@gmail.com> According to the dwarf standard pubnames and pubtypes for languages
like C++ should be the fully qualified names for the type.

Add a routine that does a language specific context walk to build
up the qualified name and use it when we add types/names to the
tables. Expand the gnu pubnames testcase as it's the most complex
to make sure that qualified types are also being added.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
bdfed1687b4288f7edb6faa637774bce903810c8 17-Oct-2013 Eric Christopher <echristo@gmail.com> Add the subprogram DIEs to the context they're created with only
if they're a declaration, otherwise they're owned by the compile
unit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192861 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
a486f55569c584d00cfdde43a8755d68cdb68c4f 16-Oct-2013 Eric Christopher <echristo@gmail.com> Fix a pair of bugs in the emission of pubname tables:

1) Make sure we emit static member variables by checking
at the end of createGlobalVariableDIE rather than piecemeal
in the function.
(As a note, createGlobalVariableDIE needs rewriting.)

2) Make sure we use the definition rather than declaration DIE
for two things: a) determining linkage for gnu pubnames, and b)
as the address of the DIE for global variables.
(As a note, createGlobalVariableDIE really needs rewriting.)

Adjust the testcase to make sure we're checking the correct DIEs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192761 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
655a10d96cd79089fc949e9f98f8484c74ec4c90 14-Oct-2013 Manman Ren <manman.ren@gmail.com> Debug Info: static member DIE creation.

Clean up creation of static member DIEs. We can create static member DIEs from
two places, so we call getOrCreateStaticMemberDIE from the two places.

getOrCreateStaticMemberDIE will get or create the context DIE first, then it
will check if the DIE already exists, if not, we create the static member DIE
and add it to the context.

Creation of static member DIEs are handled in a similar way as subprogram DIEs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
87b110ac24063a7a48a9d1273e6db596baab78a0 12-Oct-2013 Manman Ren <manman.ren@gmail.com> Debug Info: remove form from function addDIEEntry.

The form must be a reference form in addDIEEntry. Which reference form to
use will be decided by the callee.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
b8e48a636e7ee6c13140382eb93d9695a65b0624 10-Oct-2013 Manman Ren <manman.ren@gmail.com> Debug Info: In DIBuilder, the context field of subprogram is updated to use
DIScopeRef.

A paired commit at clang is required due to changes to DIBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
b4d9c11f6c7e0a38e750f946d5cea3ffa5ae8f61 09-Oct-2013 Manman Ren <manman.ren@gmail.com> Debug Info: In DIBuilder, the context and type fields of template_type and
template_value are updated to use DIRef.

A paired commit at clang is required due to changes to DIBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192320 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
43251008c2ce836f47a6e4c8a64947069d6b268e 08-Oct-2013 Manman Ren <manman.ren@gmail.com> Debug Info: rename getOriginalTypeSize to getBaseTypeSize.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
017ceda04067cb51ed4dfc01ac4ad118f0cd9f42 08-Oct-2013 Manman Ren <manman.ren@gmail.com> Debug Info: take advantage of the existing CU::resolve.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
379f76e873b91550e3d9cee79dff814e3ce1e86e 07-Oct-2013 Richard Mitton <richard@codersnotes.com> Formally added an explicit enum for DWARF TLS support. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192118 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
c664d76716ba87577b6c2a513ce4fe0712a2d3e2 05-Oct-2013 Manman Ren <manman.ren@gmail.com> Debug Info: In DIBuilder, the derived-from field of a DW_TAG_pointer_type
is updated to use DITypeRef.

Move isUnsignedDIType and getOriginalTypeSize from DebugInfo.h to be static
helper functions in DwarfCompileUnit. We already have a static helper function
"isTypeSigned" in DwarfCompileUnit, and a pointer to DwarfDebug is added to
resolve the derived-from field. All three functions need to go across link
for derived-from fields, so we need to get hold of a type identifier map.

A pointer to DwarfDebug is also added to DbgVariable in order to resolve the
derived-from field.

Debug info verifier is updated to check a derived-from field is a TypeRef.
Verifier will not go across link for derived-from fields, in debug info finder,
we go across the link to add derived-from fields to types.

Function getDICompositeType is only used by dragonegg and since dragonegg does
not generate identifier for types, we use an empty map to resolve the
derived-from field.

When printing a derived-from field, we use DITypeRef::getName to either return
the type identifier or getName of the DIType.

A paired commit at clang is required due to changes to DIBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192018 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
eee74fbbb64e5a4fd3af90611128ded5d759c82f 05-Oct-2013 Eric Christopher <echristo@gmail.com> Add a resolve method on CompileUnit that forwards to DwarfDebug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
22852c76f5791f98aadb176ebcf15af5217a67eb 05-Oct-2013 Eric Christopher <echristo@gmail.com> Make a bunch of CompileUnit member functions private.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
c4eb353c7a15f8b0283f4772dcac0571b7cc3350 05-Oct-2013 David Blaikie <dblaikie@gmail.com> Minor formatting/comment rewording/etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
ccb663668455da81a629b7abeed905a7fcc886e3 05-Oct-2013 Eric Christopher <echristo@gmail.com> Tighten up some type arguments to functions. Where we expect a
scope, pass a scope.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
356ccdceed31f84472e58df56da65b2f4f6ab72f 05-Oct-2013 David Blaikie <dblaikie@gmail.com> Remove some dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
916d49e77237c5aabfd5638b4e481c7ed9441608 05-Oct-2013 David Blaikie <dblaikie@gmail.com> Simplify setting of DIE tag for type DIEs by setting it in one* place.

* two actually due to some weird template thing... investigating that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
d3b3eef49bac03b70b6394d647cf3813e781daa2 05-Oct-2013 Eric Christopher <echristo@gmail.com> Prune includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
371d95851a4e506dd0baba01c759f5dafcb3c128 05-Oct-2013 Eric Christopher <echristo@gmail.com> Use addFlag to add the enum class attribute.

This has the side effect of using DW_FORM_flag_present on dwarf4 and above.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
9c0c9485808ba4280a62429700693c41fa304598 05-Oct-2013 Eric Christopher <echristo@gmail.com> Use Die->addValue and DIEIntegerOne directly when we want to add
a flag. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
e7099f6ff48ee99e50aa8347b455255e3a893a12 04-Oct-2013 Eric Christopher <echristo@gmail.com> Temporarily revert r176882 as it needs to be implemented in a different
way for all platforms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191975 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
3f045005bf96b6521b2769fc824283589bfa133a 04-Oct-2013 Eric Christopher <echristo@gmail.com> Temporarily revert r191792 as it is causing some LTO debug failures
on platforms with relocations in debug info and also temporarily
revert r191800 due to conflicts with the revert of r191792.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
c32f2332b065d0fb8de4db8b8ca0981564dae92b 04-Oct-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Fix ordering of members after r191928

In the case (shown in the attached test) where a member function
definition was emitted into debug info the following could occur:

1) build the debug info for the member function definition
2) in (1), build the debug info for the member function declaration
3) construct and add the member function declaration DIE
4) add it to its context
5) build its context (the type it is a member of)
6) construct the members and add them to the type
7) except don't add member functions because "getOrCreateSubprogram"
adds the function to its parent anyway
8) except we're only partway through building this subprogram
declaration so it hasn't been added yet - but we returned the partially
constructed DIE (since it's already in the MDNode->DIE mapping to avoid
infinitely recursing trying to create the member function DIE)
9) once the type is constructed, add the member function to it
10) now the members are out of order (the member function being defined
is listed as the last member, even though it was declared as the first)

To avoid this, construct the context of the subprogram DIE before we
query to see if it exists. That way we never end up creating it before
creating its context and ending up in this situation.

Alternatively, the type construction that visits/builds all the members
could call something like getOrCreateSubprogram, but that doesn't ever
do the "add to context" step. Then the type building code would always
be responsible for adding members (and the subprogram "addToContextDIE"
would no-op because the context building would have added the subprogram
declaration to the type/context DIE already).

(the test cases updated were overly-sensitive to offsets or abbreviation
numbers. We don't have a nice way to make these tests more robust as yet
- multiline FileCheck matches would be required)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
e5830c4e2603ab36f08911ff6bb117638ae529c7 03-Oct-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Avoid redundantly adding child DIEs to parents.

DIE::addChild had a shortcircuit that silently no-op'd when a child was
readded to the same parent. This hid some quirky/redundant code in
DwarfDebug/CompileUnit. By removing that functionality and replacing it
with an assert I was able to find and cleanup those cases, mostly
centering around adding members to types in various circumstances.

1) The original oddity I noticed while working on type units (which
actually was helping me in the short term, by accident) was the
addToContextOwner call in constructTypeDIE. This call was completely
bogus (why was it only done for non-virtual types? what relevance does
that have at all) and redundant with the more uniform addToContextOwner
made in getOrCreateTypeDIE.

2) If a member function definition was visited (createSubprogramDIE), it
would attempt to build the member function declaration. The declaration
DIE would then be added to its context, but in building the context (the
type for which this function is a member) the members of the type would
be added to the type automatically, so by the time the context was
constructed, the member function was already associated with it.

3) The same as (2) but without the member function being constructed
first. Whenever a type was constructed, the members would be created and
member functions would be created by getOrCreateSubprogramDIE - this
would lead to the subprogram being added to the (incomplete) type
already, then the general member-construction code would add it again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
9d08d69fd4562a4433cf19eb4b96c17b34f6da2e 03-Oct-2013 Alexey Samsonov <samsonov@google.com> Remove wild .debug_aranges entries generated from unimportant labels

r191052 added emitting .debug_aranges to Clang, but this
functionality is broken: it uses all MC labels added in DWARF Asm
printer, including the labels for build relocations between
different DWARF sections, like .Lsection_line or .Ldebug_loc0.

As a result, if any DIE .debug_info would contain "DW_AT_location=0x123"
attribute, .debug_aranges would also contain a range starting from 0x123,
breaking tools that rely on this section.

This patch fixes this by using only MC labels that corresponds to the
addresses in the user program.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
2b53089bd017139f0125b870ace94ff27dffd2ff 02-Oct-2013 Manman Ren <manman.ren@gmail.com> Debug Info: In DIBuilder, the derived-from field of a DW_TAG_pointer_type
is updated to use DITypeRef.

Move isUnsignedDIType and getOriginalTypeSize from DebugInfo.h to be static
helper functions in DwarfCompileUnit. We already have a static helper function
"isTypeSigned" in DwarfCompileUnit, and a pointer to DwarfDebug is added to
resolve the derived-from field. All three functions need to go across link
for derived-from fields, so we need to get hold of a type identifier map.

A pointer to DwarfDebug is also added to DbgVariable in order to resolve the
derived-from field.

Debug info verifier is updated to check a derived-from field is a TypeRef.
Verifier will not go across link for derived-from fields, in debug info finder,
we go across the link to add derived-from fields to types.

Function getDICompositeType is only used by dragonegg and since dragonegg does
not generate identifier for types, we use an empty map to resolve the
derived-from field.

When printing a derived-from field, we use DITypeRef::getName to either return
the type identifier or getName of the DIType.

A paired commit at clang is required due to changes to DIBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
620f436b205ab75e1dd48b9af8823bc30c53fd0e 01-Oct-2013 Manman Ren <manman.ren@gmail.com> Debug Info: remove duplication of DIEs when a DIE is part of the type system
and it is shared across CUs.

We add a few maps in DwarfDebug to map MDNodes for the type system to the
corresponding DIEs: MDTypeNodeToDieMap, MDSPNodeToDieMap, and
MDStaticMemberNodeToDieMap. These DIEs can be shared across CUs, that is why we
keep the maps in DwarfDebug instead of CompileUnit.

Sometimes, when we try to add an attribute to a DIE, the DIE is not yet added
to its owner yet, so we don't know whether we should use ref_addr or ref4.
We create a worklist that will be processed during finalization to add
attributes with the correct form (ref_addr or ref4).

We add addDIEEntry to DwarfDebug to be a wrapper around DIE->addValue. It checks
whether we know the correct form, if not, we update the worklist
(DIEEntryWorklist).

A testing case is added to show that we only create a single DIE for a type
MDNode and we use ref_addr to refer to the type DIE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
3d2c90f6dd7bc86a320b96bace7ad3fda631bf17 24-Sep-2013 Eric Christopher <echristo@gmail.com> Add namespaces to the list of items that we expose via pubnames.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
5a63474e2d4c797ca8245edae4064f17b47df3ee 24-Sep-2013 Eric Christopher <echristo@gmail.com> Add more external types to the pubtypes table. Expand the asm
checking patch until we get full dumping support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
734334e349f8a803e7dbcd969ab6e6bbf540e1bc 24-Sep-2013 Eric Christopher <echristo@gmail.com> Formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
9e0b08dd2053843fd330774cdbac06a7b0191f14 21-Sep-2013 Eric Christopher <echristo@gmail.com> Move emission of the debug string table to early in the debug
info finalization to greatly reduce the number of fixups that the
assembler has to handle in order to improve compile time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191119 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
50d37a4e569536485ace9131fa6726a36c8e0d87 21-Sep-2013 Eric Christopher <echristo@gmail.com> Migrate addGlobalName to the .cpp file as an intermediate step
to further work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
5cc319a42a914b24b164a94d9a563c728a7a4026 20-Sep-2013 Richard Mitton <richard@codersnotes.com> Added support for generate DWARF .debug_aranges sections automatically.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191052 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
e72aba9c0ff5b19128f54b09a36d2f4c2a53b40b 10-Sep-2013 Manman Ren <manman.ren@gmail.com> Debug Info: move DIScope::getContext back from DwarfDebug.

This partially reverts r190330. DIScope::getContext now returns DIScopeRef
instead of DIScope. We construct a DIScopeRef from DIScope when we are
dealing with subprogram, lexical block or name space.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
2c9905a1f3bcf22cc2f93332cc8411d11798ba07 09-Sep-2013 Manman Ren <manman.ren@gmail.com> Debug Info: Use DIScopeRef for DIType::getContext.

In DIBuilder, the context field of a TAG_member is updated to use the
scope reference. Verifier is updated accordingly.

DebugInfoFinder now needs to generate a type identifier map to have
access to the actual scope. Same applies for BreakpointPrinter.

processModule of DebugInfoFinder is called during initialization phase
of the verifier to make sure the type identifier map is constructed early
enough.

We are now able to unique a simple class as demonstrated by the added
testing case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
18eb245a2e5ec41b5da1367d5f7e7619532f7ceb 09-Sep-2013 Manman Ren <manman.ren@gmail.com> Debug Info: move DIScope::getContext to DwarfDebug.

DIScope::getContext is a wrapper function that calls the specific getContext
method on each subclass. When we switch DIType::getContext to return DIScopeRef
instead of DIScope, DIScope::getContext can no longer return a DIScope without
a type identifier map.

DIScope::getContext is only used by DwarfDebug, so we move it to DwarfDebug
to have easy access to the type identifier map.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
02d296759cd53f2d6081fd307c4d81cc41f2c9ed 09-Sep-2013 Manman Ren <manman.ren@gmail.com> Debug Info: Move isSubprogramContext from DebugInfo to DwarfDebug.

This helper function needs the type identifier map when we switch
DIType::getContext to return DIScopeRef instead of DIScope.

Since isSubprogramContext is used by DwarfDebug only, We move it to DwarfDebug
to have easy access to the map.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190325 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
0e85f6e391990cc20be98263640b843edfa32bef 07-Sep-2013 Manman Ren <manman.ren@gmail.com> Debug Info: Use identifier to reference DIType in containing type field of
a DISubprogram.

Verifier is updated accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190229 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
e42279cda481b48138d2119f4a4bbce7077f0a72 06-Sep-2013 Manman Ren <manman.ren@gmail.com> Debug Info: Use identifier to reference DIType in containing type field of
a DICompositeType.

Verifier is updated accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190190 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
bc66071baa3153ba95d673b8084383835221eef6 05-Sep-2013 Manman Ren <manman.ren@gmail.com> Debug Info: Use identifier to reference DIType in base type field of
ptr_to_member.

We introduce a new class DITypeRef that represents a reference to a DIType.
It wraps around a Value*, which can be either an identifier in MDString
or an actual MDNode. The class has a helper function "resolve" that
finds the actual MDNode for a given DITypeRef.

We specialize getFieldAs to return a field that is a reference to a
DIType. To correctly access the base type field of ptr_to_member,
getClassType now calls getFieldAs<DITypeRef> to return a DITypeRef.

Also add a typedef for DITypeIdentifierMap and a helper
generateDITypeIdentifierMap in DebugInfo.h. In DwarfDebug.cpp, we keep
a DITypeIdentifierMap and call generateDITypeIdentifierMap to actually
populate the map.

Verifier is updated accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
577056f89c840537b059ea4cef8d2ae18513cda0 05-Sep-2013 Eric Christopher <echristo@gmail.com> Move accelerator table defines and constants to Dwarf.h since
we're proposing it for DWARF5.

No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
dc42d031fb5787733d6765d6fefc76d46a7a4c9b 04-Sep-2013 Michael Gottesman <mgottesman@apple.com> Revert "Revert "Remove the darwin gdb option, that version of gdb is now dead and the rest of the compatibility should be done on a dwarf-N level.""

This reverts commit r189913.

Talked with Eric on IRC. I am going to XFAIL the failing test since it
is using what Eric described as "the member hack" which was needed on
that old GDB.

Sorry for the noise!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
14ce9f1d253472b73689787c28808dd2ade6281d 04-Sep-2013 Michael Gottesman <mgottesman@apple.com> Revert "Remove the darwin gdb option, that version of gdb is now dead and the rest of the compatibility should be done on a dwarf-N level."

This reverts commit r189903.

This commit broke the phase 1 buildbot for a while.

http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RAincremental/builds/6684

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189913 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
0a69049b6232a2183de23867c1fb2e4fa38ee093 04-Sep-2013 Eric Christopher <echristo@gmail.com> Remove the darwin gdb option, that version of gdb is now dead and
the rest of the compatibility should be done on a dwarf-N level.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189903 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
7b2ee399d9c1b2112962d29540c25b94fa98e8ed 28-Aug-2013 Eric Christopher <echristo@gmail.com> Use DW_FORM_sdata for signed constant values and udata on occasion
when we can. Migrate from using blocks when we're adding just a
single attribute and floating point values are an unsigned, not signed,
bag of bits.

Update all test cases accordingly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
7b87895a6c7307a0ee809659abdaefe4a48b6bc6 27-Aug-2013 Eric Christopher <echristo@gmail.com> Remove the language parameter and variable from the compile unit. We
can get it via the MDNode that's passed in. Save that instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
2883fd4df4bba4bb57b984bcea5fa896d435a662 19-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: don't emit zero-length names for parameters

We check this in many/all other cases, just missed this one it seems.
Perhaps it'd be worth unifying this so we never emit zero-length
DW_AT_names.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
692062f18023979c0f8d5a155c14cf1f1616a2b0 16-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Allow the addition of other (such as static data) members to a record type after construction

Plus a type cleanup & minor fix to enumerate members of declarations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
76ef79f410853a431c820cb5d0ee11cd66d4c90d 08-Aug-2013 Eric Christopher <echristo@gmail.com> For DW_TAG_template_type_parameter the actual passed in type could
be void and therefore not have a type entry. Only add the type if
it is non-void and provide a testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
37c107b9b57aab9a13cde0d1db41b66565941f9d 08-Aug-2013 Eric Christopher <echristo@gmail.com> The conversion to bool is fine here, no need to check isType.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
dc1363f5af47542a602c80e726749bc06d8ef3f8 08-Aug-2013 Eric Christopher <echristo@gmail.com> Make sure that if we're going to attempt to add a type to a DIE that
the type exists.

Fix up cases where we weren't checking for optional types and add
an assert to addType to make sure we catch this in the future.

Fix up a testcase that was using the tag for DW_TAG_array_type
when it meant DW_TAG_enumeration_type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187963 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
afdd1f8a851349e2b3cdc6d441043ac3f4cdb9b9 08-Aug-2013 Eric Christopher <echristo@gmail.com> Change variable name and reflow formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
31667626106048c07866d996e667a3a10010ef4b 08-Aug-2013 Eric Christopher <echristo@gmail.com> Be more rigorous about the sizes of forms and attributes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
c8b93557da150e051c273701652a2db328708708 01-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Emit definitions for types with no members.

The absence of members was a poor/incorrect proxy for "is definition".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
3dee575b8dfe9c3d89f581e51dd11ddd08c43cd6 26-Jul-2013 Eric Christopher <echristo@gmail.com> Add preliminary support for hashing DIEs and breaking them into
type units.

Initially this support is used in the computation of an ODR checker
for C++. For now we're attaching it to the DIE, but in the future
it will be attached to the type unit.

This also starts breaking out types into the separation for type
units, but without actually splitting the DIEs.

In preparation for hashing the DIEs this adds a DIEString type
that contains a StringRef with the string contained at the label.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
010dbfdf9357f7db9dd93af35d6454919f7988f9 14-Jul-2013 Eric Christopher <echristo@gmail.com> Collapse temporary variable into call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
61c91d5d7c3b40837e5512b53b15b3e3a65833fa 10-Jul-2013 Eric Christopher <echristo@gmail.com> Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
b2754919ca52316755f5ce70f53db9966bee42b5 09-Jul-2013 Adrian Prantl <aprantl@apple.com> Typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
3517640443f0b5224e2a6414c246ac60016ee9d4 09-Jul-2013 Adrian Prantl <aprantl@apple.com> Reapply an improved version of r180816/180817.

Change the informal convention of DBG_VALUE machine instructions so that
we can express a register-indirect address with an offset of 0.
The old convention was that a DBG_VALUE is a register-indirect value if
the offset (operand 1) is nonzero. The new convention is that a DBG_VALUE
is register-indirect if the first operand is a register and the second
operand is an immediate. For plain register values the combination reg,
reg is used. MachineInstrBuilder::BuildMI knows how to build the new
DBG_VALUES.

rdar://problem/13658587

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
d03d2b243a1c3b32a19ed4f387ac9d66febf8c2c 08-Jul-2013 Manman Ren <mren@apple.com> Debug Info: clean up usage of Verify.

No functionality change. It should suffice to check the type of a debug info
metadata, instead of calling Verify.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
e4721495b68d770a529b6e1c6cc33655db29c0e2 03-Jul-2013 Eric Christopher <echristo@gmail.com> addConstantValue, addConstantFPValue never returned anything but
true, so remove the return value and propagate accordingly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185490 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
716a94f0c96d6bef575cd286bafb2cc507adc6b0 02-Jul-2013 Ulrich Weigand <ulrich.weigand@de.ibm.com> [DebugInfo] Allow getDebugThreadLocalSymbol to return MCExpr

This allows getDebugThreadLocalSymbol to return a generic MCExpr
instead of just a MCSymbolRefExpr.

This is in preparation for supporting debug info for TLS variables
on PowerPC, where we need to describe the variable location using
a more complex expression than just MCSymbolRefExpr.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
1f8aacd6afdc30b4d1cf1da3bf5e41c7874f89be 02-Jul-2013 Ulrich Weigand <ulrich.weigand@de.ibm.com> [DebugInfo] Introduce DIEExpr variant of DIEValue to hold MCExpr values

This partially reverts r185202 and restores DIELabel to hold plain
MCSymbol references. Instead, we add a new subclass DIEExpr of
DIEValue that can hold generic MCExpr references.

This is in preparation for supporting debug info for TLS variables
on PowerPC, where we need to describe the variable location using
a more complex expression than just MCSymbolRefExpr.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185458 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
8fed05ec1ba90c688d71323fe8a1c3070adf58cf 02-Jul-2013 David Blaikie <dblaikie@gmail.com> PR14728: DebugInfo: TLS variables with -gsplit-dwarf

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185398 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
59eaa3874663f80ce111a4781b8f1db82995210c 28-Jun-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: PR14728: TLS support

Based on GCC's output for TLS variables (OP_constNu, x@dtpoff,
OP_lo_user), this implements debug info support for TLS in ELF. Verified
that this output is correct/sufficient on Linux (using gold - if you're
using binutils-ld, you'll need something with the fix for
http://sourceware.org/bugzilla/show_bug.cgi?id=15685 in it).

Support on non-ELF is sort of "arbitrary" at the moment - if Apple folks
want to discuss (or just go ahead & implement) how this should work in
MachO, etc, I'm open.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185203 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
95e72c90e4e2ee64e12d898f6495e796ebcadaf8 28-Jun-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Pass MCSymbolRefExprs for labels instead of MCSymbols

This is a precursor to adding debug info support for TLS which requires
non-default relocations applied to TLS symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185202 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
afbe0e266cc3bcb6dcb318166f4a2f998cefd9b1 24-Jun-2013 Eric Christopher <echristo@gmail.com> Formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
f61dbc15750f0b1a9a089ac91e6f5e7235335c25 24-Jun-2013 Eric Christopher <echristo@gmail.com> Use const references instead of pointers to references that are
never modified. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
e88939cfebbc98133553c6fc03a52b8fb1adbb70 22-Jun-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Support (using GNU extensions) for template template parameters and parameter packs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
4532c280f540de22c83ca2525f1a9a7722b4d7e3 20-Jun-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: don't use location lists when the location covers the whole function anyway

Fix up three tests - one that was relying on abbreviation number,
another relying on a location list in this case (& testing raw asm,
changed that to use dwarfdump on the debug_info now that that's where
the location is), and another which was added in r184368 - exposing a
bug in that fix that is exposed when we emit the location inline rather
than through a location list. Fix that bug while I'm here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184387 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
6d9dbd5526e3161db884fc4fe99c278bb59ccc19 16-Jun-2013 David Blaikie <dblaikie@gmail.com> Debug Info: Simplify Frame Index handling in DBG_VALUE Machine Instructions

Rather than using the full power of target-specific addressing modes in
DBG_VALUEs with Frame Indicies, simply use Frame Index + Offset. This
reduces the complexity of debug info handling down to two
representations of values (reg+offset and frame index+offset) rather
than three or four.

Ideally we could ensure that frame indicies had been eliminated by the
time we reached an assembly or dwarf generation, but I haven't spent the
time to figure out where the FIs are leaking through into that & whether
there's a good place to convert them. Some FI+offset=>reg+offset
conversion is done (see PrologEpilogInserter, for example) which is
necessary for some SelectionDAG assumptions about registers, I believe,
but it might be possible to make this a more thorough conversion &
ensure there are no remaining FIs no matter how instruction selection
is performed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
7c2b4be2a718b994298803dd09e81e49a016ffb2 01-Jun-2013 Benjamin Kramer <benny.kra@googlemail.com> Move getRealLinkageName to a common place and remove all the duplicates of it.

Also simplify code a bit while there. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
5592ba4775964ab5e15a4603249e6beadfa5ce7a 30-May-2013 Eric Christopher <echristo@gmail.com> Formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
742671bf8e422aadcf3b7697a8844b9eb6f566f2 29-May-2013 Manman Ren <mren@apple.com> LTO+Debug Info: revert r182791.

Since the testing case uses ref_addr, which requires version 3+ to work,
we will solve the dwarf version issue first.

This patch also causes failures in one of the bots. I will update the patch
accordingly in my next attempt.

rdar://13926659


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
9174fd77e5e299fa3b1357a85ad82173217270b7 28-May-2013 Manman Ren <mren@apple.com> LTO+Debug Info: correctly emit inlined_subroutine when the inlined callee is
from a different CU.

We used to print out an error message and fail to generate inlined_subroutine.

If we use ref_addr in the generated DWARF, the DWARF version should be 3 or
above.
rdar://13926659


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182791 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
3d33184d9da02fb699827249e0631106252f72fa 23-May-2013 David Blaikie <dblaikie@gmail.com> Solidify the assumption that a DW_TAG_subprogram's type is a DW_TAG_subroutine_type

There were bits & pieces of code lying around that may've given the
impression that debug info metadata supported the possibility that a
subprogram's type could be specified by a non-subroutine type describing
the return type of a void function. This support was incomplete &
unnecessary. Asserts & API have been changed to make the desired usage
more clear.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
4de9d72883eebe4e86bffdaad89483dfe822e2a5 10-May-2013 David Blaikie <dblaikie@gmail.com> PR14492: Debug Info: Support for values of non-integer non-type template parameters.

This is only tested for global variables at the moment (& includes tests
for the unnamed parameter case, since apparently this entire function
was completely untested previously)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
c496875f0c205ffadcec8060e1170e1c58e4eb55 09-May-2013 Eric Christopher <echristo@gmail.com> Revert "Make sure debug info contains linkage names (DW_AT_MIPS_linkage_name)"
temporarily while investigating gdb.cp/templates.exp.

This reverts commit r181471.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181496 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
cc55d4528c9ff3a2e0b148fd311be8d912ad22f4 08-May-2013 Eric Christopher <echristo@gmail.com> Make sure debug info contains linkage names (DW_AT_MIPS_linkage_name)
for constructors and destructors since the original declaration given
by the AT_specification both won't and can't.

Patch by Yacine Belkadi, I've cleaned up the testcases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181471 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
9c57ad2381488b7cde7e3eb459d2ce3e447e93b7 08-May-2013 Eric Christopher <echristo@gmail.com> Pass the MDNode in and do the insertion at compile unit creation time
instead of relying upon an extra call to finish initializing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
6c3bb94445305f8ee0be6d3c9457a411bf22b3eb 22-Apr-2013 Eric Christopher <echristo@gmail.com> Update comment. Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
2e892e4e27ecb6b1af757796841db5ff18df99a9 05-Apr-2013 Adrian Prantl <aprantl@apple.com> typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178804 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
bc3e96f17bb278358cd3976f35b87591a392f5af 12-Mar-2013 Manman Ren <mren@apple.com> Debug Info: use DW_FORM_ref_addr instead of DW_FORM_ref4 if the referenced DIE
belongs to a different compile unit.

DW_FORM_ref_addr should be used for cross compile-unit reference.

When compiling a large application, we got a dwarfdump verification error where
abstract_origin points to nowhere.

This error can't be reproduced on any testing case in MultiSource.
We may have other cases where we use DW_FORM_ref4 unconditionally.

rdar://problem/13370501


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176882 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
c0ec8a4f4db3c579dfc8c219dc39014f34260b42 12-Mar-2013 David Blaikie <dblaikie@gmail.com> Remove support for versioned debug info.

Versioned debug info support has been a burden to maintain & also compromised
current debug info verification by causing test cases testing old debug info to
remain rather than being updated to the latest. It also makes it hard to add or
change the metadata schema by requiring various backwards-compatibility in the
DI* hierarchy.

So it's being removed in preparation for new changes to the schema to tidy up
old/unnecessary fields and add new fields needed for new debug info (well, new
to LLVM at least).

The more surprising part of this is the changes to DI*::Verify - this became
necessary due to the changes to AsmWriter. AsmWriter was relying on the version
test to decide which bits of metadata were actually debug info when printing
the comment annotations. Without the version information the tag numbers were
too common & it would print debug info on random metadata that happened to
start with an integer that matched a tag number. Instead this change makes the
Verify functions more precise (just adding "number of operands" checks - not
type checking those operands yet) & relies on that to decide which metadata is
debug info metadata.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
3de61b4c0144748e4b9157e2c22fe4ea685981a2 07-Mar-2013 Manman Ren <mren@apple.com> Debug Info: store the files and directories for each compile unit.

We now emit a line table for each compile unit. To reduce the prologue size
of each line table, the files and directories used by each compile unit are
stored in std::map<unsigned, std::vector< > > instead of std::vector< >.

The prologue for a lto'ed image can be as big as 93K. Duplicating 93K for each
compile unit causes a huge increase of debug info. With this patch, each
prologue will only emit the files required by the compile unit.

rdar://problem/13342023


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
a8ada25afdb74a1cc53c183348ad9a424501dc96 28-Feb-2013 Eric Christopher <echristo@gmail.com> Remove unnecessary check against isGlobalVariable. We check it
a few lines above.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
8d45a98eb14338428155be70681a42dccc03a5ce 28-Feb-2013 Eric Christopher <echristo@gmail.com> Rework comment slightly and fix a few typos.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
21a08a1189df7922de3a89432cf896ed681db5d5 28-Feb-2013 Manman Ren <mren@apple.com> Debug Info: for static member variables, always put AT_MIPS_linkage_name to the
definition DIE (TAG_variable), and put AT_MIPS_linkage_name to TAG_member when
DarwinGDBCompat is true.

Darwin GDB needs AT_MIPS_linkage_name at both places to work.

Follow-up patch to r176143.
rdar://problem/13291234


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176220 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
06df83c25a7b07b3a19a40bd680c0a205bcc0b9a 27-Feb-2013 Manman Ren <mren@apple.com> Debug Info: for static member variables, add AT_MIPS_linkage_name to the
definition DIE, to make old GDB happy.

We have a regression for old GDB when Clang uses DW_TAG_member to declare
static members inside a class, instead of DW_TAG_variable. This patch will fix
this regression.

rdar://problem/13291234


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
d61c840fcda18675c131bf86bb6d4498fcb6c272 26-Feb-2013 Manman Ren <mren@apple.com> Revert r176120 as it caused a failure at static-member.cpp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176129 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
6fe26103d71263124e3cc56c0a349cb1391208a1 26-Feb-2013 Manman Ren <mren@apple.com> Debug Info: for static member variables, move AT_MIPS_linkage_name from
TAG_member inside a class to the specification DIE.

Having AT_MIPS_linkage_name on TAG_member caused old gdb (GNU 6.3.50) to
error out. Also gcc 4.7 has AT_MIPS_linkage_name on the specification DIE.

rdar://problem/13291234


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
c5ef7eee3c412b0f334e395b0cf7c363200c2f79 12-Feb-2013 Krzysztof Parzyszek <kparzysz@codeaurora.org> Allow optionally generating pubnames section in DWARF info. Introduce
option "generate-dwarf-pubnames" to control it, set to "false" by default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
945e828003b746f6bbe86390940cf1433d18b0a1 02-Feb-2013 Manman Ren <mren@apple.com> [Dwarf] avoid emitting multiple AT_const_value for static memebers.

Testing case is reduced from MultiSource/BenchMarks/Prolangs-C++/deriv1.

rdar://problem/13071590


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
aaf2e639ecf2e5a1647e6d59ef53dc76da0a6102 29-Jan-2013 David Blaikie <dblaikie@gmail.com> Support artificial parameters in function types.

Provides the functionality for Clang change r172911 - I just had this still
lying around.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173820 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
14268416720155d63f190a6143ee40b3b850e409 20-Jan-2013 David Blaikie <dblaikie@gmail.com> The last of PR14471 - emission of constant floats

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172941 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
0969ddf601c7cf9da2b01fe227005951c6af0cac 18-Jan-2013 Eric Christopher <echristo@gmail.com> Split out DW_OP_addr for the split debug info DWARF5 proposal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172857 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
6b6061f01171bd3d4e32022efa45428d4f9941ee 16-Jan-2013 Eric Christopher <echristo@gmail.com> Define metadata interfaces for describing a static data member
of a class. Emit static data member declarations and definitions
through correctly.

Part of PR14471.

Patch by Paul Robinson!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
72f7bfbf0e02bb11d3e7cca1f9598c5f9d9fa2ca 16-Jan-2013 Eric Christopher <echristo@gmail.com> Split address information for DWARF5 split dwarf proposal. This involves
using the DW_FORM_GNU_addr_index and a separate .debug_addr section which
stays in the executable and is fully linked.

Sneak in two other small changes:

a) Print out the debug_str_offsets.dwo section.
b) Change form we're expecting the entries in the debug_str_offsets.dwo
section to take from ULEB128 to U32.

Add tests for all of this in the fission-cu.ll test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
9a1e0e252a7ede548acaac98cf304d4bb135fb97 08-Jan-2013 Eric Christopher <echristo@gmail.com> Remove the llvm-local DW_TAG_vector_type tag and add a test to
make sure that vector types do work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
3cc42205600b2d3865efd1585d79663c41e048f1 07-Jan-2013 Eric Christopher <echristo@gmail.com> Add more comments to what's going on here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
dd8e9f395e881972b320d947de88102a0be04b70 07-Jan-2013 Eric Christopher <echristo@gmail.com> Add support for separating strings for the split debug info DWARF5
proposal. This leaves the strings in the skeleton die as strp,
but in all dwo files they're accessed now via DW_FORM_GNU_str_index.

Add support for dumping these sections and modify the fission-cu.ll
testcase to have the correct strings and form. Fix a small bug
in the fixed form sizes routine that involved out of array accesses
for the table and add a FIXME in the extractFast routine to fix
this up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
62fdfb5fa7efdfd61339e4abe6fd87e60e939e58 07-Jan-2013 David Blaikie <dblaikie@gmail.com> PR14759: Debug info support for C++ member pointers.

This works fine with GDB for member variable pointers, but GDB's support for
member function pointers seems to be quite unrelated to
DW_TAG_ptr_to_member_type. (see GDB bug 14998 for details)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
00ece1b846536cb2ba4efefa6e6194c7030e4c63 05-Jan-2013 David Blaikie <dblaikie@gmail.com> Emit DW_TAG_formal_parameter for unnamed parameters.

This change essentially reverts r87069 which came without a test case. It
causes no regressions in the GDB 7.5 test suite & fixes 25 xfails (commit
to the test suite to follow). If anyone can present a test case that
demonstrates why this check is necessary I'd be happy to account for it in one
way or another.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
8cab6edf4fa46d9bd06ff3ce0e1dd4557be58b65 04-Jan-2013 Eric Christopher <echristo@gmail.com> Add a name for the anonymous type we're creating for subrange
types and a FIXME for what we should be doing. Should solve the
immediacy of PR12069 where our debug info is crashing another
tool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
0b8c9a80f20772c3793201ab5b251d3520b9cea3 02-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Move all of the header files which are involved in modelling the LLVM IR
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long standing point
of file layout clutter in LLVM.

There are still more header files to move here, but I wanted to handle
them in separate commits to make tracking what files make sense at each
layer easier.

The only really questionable files here are the target intrinsic
tablegen files. But that's a battle I'd rather not fight today.

I've updated both CMake and Makefile build systems (I think, and my
tests think, but I may have missed something).

I've also re-sorted the includes throughout the project. I'll be
committing updates to Clang, DragonEgg, and Polly momentarily.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
2e5d870b384f7cc20ba040e827d54fa473f60800 20-Dec-2012 Eric Christopher <echristo@gmail.com> Start splitting out the debug string section handling by moving it
into the DwarfUnits class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170770 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
01bc2b39a4cbe76537e11411038bb834bceaf8a0 13-Dec-2012 David Blaikie <dblaikie@gmail.com> Debug Info: add support to mark member variables as artificial

This is the LLVM portion of r170154.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170156 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
6afe478e005bf9f112b32b7ec25879475adc1915 06-Dec-2012 Bill Wendling <isanbard@gmail.com> s/getLowerBoundDefault/getDefaultLowerBound/ for consistency. Also put the more natural check first in the if-then statement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169486 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
222c2fd60d0cbe676f3f316a4d62a75762a83c40 06-Dec-2012 Bill Wendling <isanbard@gmail.com> Handle non-default array bounds.

Some languages, e.g. Ada and Pascal, allow you to specify that the array bounds
are different from the default (1 in these cases). If we have a lower bound
that's non-default, then we emit the lower bound. We also calculate the correct
upper bound in those cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169484 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
9493dae613847b01b79914502f337814fe3e00ac 04-Dec-2012 Bill Wendling <isanbard@gmail.com> Use the 'count' attribute to calculate the upper bound of an array.

The count attribute is more accurate with regards to the size of an array. It
also obviates the upper bound attribute in the subrange. We can also better
handle an unbound array by setting the count to -1 instead of the lower bound to
1 and upper bound to 0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169312 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
a7645a3c66668da5e2bc772a8e5ab03dc301610c 04-Dec-2012 Bill Wendling <isanbard@gmail.com> Add a 'count' field to the DWARF subrange.

The count field is necessary because there isn't a difference between the 'lo'
and 'hi' attributes for a one-element array and a zero-element array. When the
count is '0', we know that this is a zero-element array. When it's >=1, then
it's a normal constant sized array. When it's -1, then the array is unbounded.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
d4a05e0c2c871a0acbadfe572abbdb99158871bd 03-Dec-2012 Eli Bendersky <eliben@google.com> Fix PR12942: Allow two CUs to be generated from the same source file.

Thanks Eric for the review.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
d04a8d4b33ff316ca4cf961e06c9e312eff8e64f 03-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Use the new script to sort the includes of every file under lib.

Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
8b4310b8061d3d5ef26a4a313f53804a8ad02fc9 21-Nov-2012 Eric Christopher <echristo@gmail.com> Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
7ee5f5d61f18deda7412fdff4c2729c59a436b27 21-Nov-2012 Eric Christopher <echristo@gmail.com> Update for some of the coding standard before rearranging functions
around.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168401 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
242343d1ab0d6b10221569fd2c504842a561f0e7 14-Nov-2012 Eric Christopher <echristo@gmail.com> Revert "Use the 'count' attribute instead of the 'upper_bound' attribute."
temporarily as it is breaking the gdb bots.

This reverts commit r167806/e7ff4c14b157746b3e0228d2dce9f70712d1c126.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
e7ff4c14b157746b3e0228d2dce9f70712d1c126 13-Nov-2012 Bill Wendling <isanbard@gmail.com> Use the 'count' attribute instead of the 'upper_bound' attribute.

If we have a type 'int a[1]' and a type 'int b[0]', the generated DWARF is the
same for both of them because we use the 'upper_bound' attribute. Instead use
the 'count' attrbute, which gives the correct number of elements in the array.
<rdar://problem/12566646>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
3574eca1b02600bac4e625297f4ecf745f4c4f32 08-Oct-2012 Micah Villmow <villmow@gmail.com> Move TargetData to DataLayout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
d57ae39a885649cf4d86e50e11fd2c453eae78d5 21-Sep-2012 Eric Christopher <echristo@apple.com> Only emit DW_AT_object_pointer if this is a definition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
e521278f00cf5f4ea0cc4aac126df30924d3e705 13-Sep-2012 Eric Christopher <echristo@apple.com> Recommit, with fixes:

Add some support for dealing with an object pointer on arguments.

Part of rdar://9797999

which now supports adding the object pointer attribute to the
subprogram as it should.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163754 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
fd1cd572211aae8f73dc073c004b865054a34604 12-Sep-2012 Eric Christopher <echristo@apple.com> Revert "Add some support for dealing with an object pointer on arguments."
This should be done on the subprogram, not the variable itself.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
2c57a334d762275a0ba478b7c39f384992bcdf6a 12-Sep-2012 Eric Christopher <echristo@apple.com> Add some support for dealing with an object pointer on arguments.

Part of rdar://9797999

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
5c38de99f104daaf1624b28def2c8375a702466d 11-Sep-2012 Eric Christopher <echristo@apple.com> No reason to construct this twice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
873cf0a0d7906083578d9b793008348750636138 24-Aug-2012 Eric Christopher <echristo@apple.com> Use DW_FORM_flag_present to save space in debug information if we're
not in darwin gdb compat mode.

Fixes rdar://10975088

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
cbbd5b1d86e0d06c804f4cdd61e0676b2d2f5c85 24-Aug-2012 Eric Christopher <echristo@apple.com> Remove the DW_AT_MIPS_linkage name attribute when we don't need it
output (we're emitting a specification already and the information
isn't changing) and we're not in old gdb compat mode.

Saves 1% on the debug information for a build of llvm.

Fixes rdar://11043421

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
443c9ed7688e66c55c43819a75be681574b291de 14-Aug-2012 Eric Christopher <echristo@apple.com> Grammar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
caba263c8e28474e3d6feb307af8fc4445645962 04-Jul-2012 Eric Christopher <echristo@apple.com> Reduce some code duplication.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159701 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
16eeb6f5ebc978b03745177b9ac82684ab1c6932 29-Jun-2012 Bill Wendling <isanbard@gmail.com> The DIBuilder class is just a wrapper around debug info creation
(a.k.a. MDNodes). The module doesn't belong in Analysis. Move it to the VMCore
instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159414 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
fc4199bf4add3422ce6470ca47bbe6bff2d70ea5 01-Jun-2012 Eric Christopher <echristo@apple.com> Add support for enum forward declarations.

Part of rdar://11570854

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
27302f07393d4db22e8ad06ac2ad4e7f01370b17 27-May-2012 Peter Collingbourne <peter@pcc.me.uk> Have getOrCreateSubprogramDIE store the DIE for a subprogram
definition in the map before calling itself to retrieve the
DIE for the declaration. Without this change, if this causes
getOrCreateSubprogramDIE to be recursively called on the definition,
it will create multiple DIEs for that definition. Fixes PR12831.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157541 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
bb0f6eac1f2d04e485607f0726c31a84ce9b8ced 23-May-2012 Eric Christopher <echristo@apple.com> Add support for C++11 enum classes in llvm.

Part of rdar://11496790

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157303 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
4d069bf8ec726570d668e59fda993a33dfb7cb0b 22-May-2012 Eric Christopher <echristo@apple.com> Untabify and 80-col.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
4a5d839dfa07fd6a187581b00c1a09ece30d9a08 22-May-2012 Eric Christopher <echristo@apple.com> Formatting consistency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
501207676c78fefcfc9eeeaa1e3dbe9ea857d33f 08-May-2012 Eric Christopher <echristo@apple.com> Handle OpDeref in case it comes in as a register operand.

Part of rdar://11352000

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156405 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
e9722e1e8ba43bff2dc8ee3ae948e31f3fb0e370 17-Apr-2012 Eric Christopher <echristo@apple.com> Make comment here more clear.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
b8ca98874316bfe8e46b27e7a034a8a764c92e08 29-Mar-2012 Eric Christopher <echristo@apple.com> Add support for objc property decls according to the page at:

http://llvm.org/docs/SourceLevelDebugging.html#objcproperty

including type and DECL. Expand the metadata needed accordingly.

rdar://11144023

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
663e0cf73dcf2bfbbfc22b49c739d54916652d1c 28-Mar-2012 Eric Christopher <echristo@apple.com> Fix the output of the DW_TAG_friend tag to include DW_AT_friend
and not the rest of the member tag.

Fixes PR11695

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153570 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
2125d5a7e58eb21f34c2a21913d6f1074c63b5cd 16-Mar-2012 Eric Christopher <echristo@apple.com> For types with a parent of the compile unit make sure and emit
the DECL information.

rdar://10855921

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152876 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
8d101c31d293bcb8ece8fecdb3325cd0728bed08 15-Mar-2012 Eric Christopher <echristo@apple.com> Revert the removal of DW_AT_MIPS_linkage_name when we aren't putting
out the DW_AT_name. Older gdbs unfortunately still use it to
disambiguate member functions in templated classes (gdb.cp/templates.exp).

rdar://11043421 (which is now deferred for a bit)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
fc7e9ef23941e8a9ab3055e9f50ac4704b6d24a2 14-Mar-2012 Eric Christopher <echristo@apple.com> Remove the DW_AT_MIPS_linkage name attribute when we don't need it
output (we're emitting a specification already and the information
isn't changing).

Saves 1% on the debug information for a build of llvm.

Fixes rdar://11043421

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
8938895a8338e6084eb12a2bb4bf044928436173 07-Mar-2012 Eric Christopher <echristo@apple.com> Add the DW_AT_APPLE_runtime_class attribute to forward declarations
as well as completely defined classes.

This fixes rdar://10956070

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
8b6fe6b651064da51bb9bc63ece8bf1f2a36d66a 22-Feb-2012 Eric Christopher <echristo@apple.com> Only add DW_AT_prototyped if we're working with a C-like language.
Worth another 45k (1%) off of a large C++ testcase.

rdar://10909458

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151144 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
438b092a4bba8d766316542ced10b7b028bad82c 22-Feb-2012 Eric Christopher <echristo@apple.com> Add the source language into the compile unit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
e2dc9336d15ad3ca4f38d296d17f6682829b80b4 22-Feb-2012 Eric Christopher <echristo@apple.com> Remove extra semi-colon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
35f225aa2c04ca2420161cca812cb3eb611bde51 21-Feb-2012 Eric Christopher <echristo@apple.com> There's no need for a DW_AT_byte_size on a pointer type.

Part of rdar://10493979 where it reduces by about .5% (10k)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
30d409ca097e35c51964c9dac642804e5e495906 08-Feb-2012 Devang Patel <dpatel@apple.com> Remove tabs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
6588abf377b7381274236e651462ec83052f6013 06-Feb-2012 Devang Patel <dpatel@apple.com> DebugInfo: Provide a new hook to encode relationship between a property and an ivar.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149874 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
9e11eb1ddb2988d0a751fdcfe433bc816c83f1f2 04-Feb-2012 Devang Patel <dpatel@apple.com> Emit new property tag.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
e016789b7380b2a452f81ce15c2e382e62ede120 07-Jan-2012 Eric Christopher <echristo@apple.com> Add a comment and ensure that anyone else looking at this code doesn't start
to bleed from the eyes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147695 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
c36145f19c1e164f7d630b813e9970600d8f2976 06-Jan-2012 Eric Christopher <echristo@apple.com> As part of the ongoing work in finalizing the accelerator tables, extend
the debug type accelerator tables to contain the tag and a flag
stating whether or not a compound type is a complete type.

rdar://10652330

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147651 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
1a8e8869cafa16d94afcb6f73bc3e0f2f72f70f1 17-Dec-2011 Eric Christopher <echristo@apple.com> Resolve part of a fixme and add a new one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
44625f91c57638d178fcb464681ae5a293a1f100 17-Dec-2011 Eric Christopher <echristo@apple.com> Add a fixme here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
798313d6c1f48634f0964d82c6b31364058a280f 14-Dec-2011 Nick Lewycky <nicholas@mxc.ca> DW_AT_virtuality is also defined to be constant, not flag.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
13aaca5edf538f967c16b8bdbfe293e2f9d75fc1 13-Dec-2011 Nick Lewycky <nicholas@mxc.ca> DW_AT_accessibility is "constant" class, not form class, so it may not use
DW_FORM_flag. Use DW_FORM_data1 for one byte.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
ce35d8b5a1071bb8ccf70bf8be3952dd0c4f2f15 18-Nov-2011 Devang Patel <dpatel@apple.com> DISubrange supports unsigned lower/upper array bounds, so let's not fake it in the end while emitting DWARF. If a FE needs to encode signed lower/upper array bounds then we need to extend DISubrange or ad DISignedSubrange.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144937 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
d61c34ba30888c49f4f223422f30b018a41594da 11-Nov-2011 Eric Christopher <echristo@apple.com> Initialize variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144360 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
d117fbb2311f6b05770ee680135eaac4eb6d16d1 11-Nov-2011 Eric Christopher <echristo@apple.com> If we have a DIE with an AT_specification use that instead of the normal
addr DIE when adding to the dwarf accelerator tables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
01b55b4a808d04cbff7b62f55eaeb62019340bc0 10-Nov-2011 Rafael Espindola <rafael.espindola@gmail.com> Check in getOrCreateSubprogramDIE if a declaration exists and if so output
it first.

This is a more general fix to pr11300.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144324 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
1b3f9198ab3880be34b6252423b9e388b5cd6a5e 10-Nov-2011 Eric Christopher <echristo@apple.com> Move type handling to make sure we get all created types that aren't
forward decls and have names into the dwarf accelerator types table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144306 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
dfa30e1ab243990eda4732a6dffb91e965e7a755 09-Nov-2011 Eric Christopher <echristo@apple.com> Remove the pubnames section, no one consumes it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144169 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
74d8a87f40dd89ec263071c0af4d77104b166f4a 08-Nov-2011 Eric Christopher <echristo@apple.com> Also add the linkage name to the name accelerator tables if it exists
and is different than the normal name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
56c2b109f73f895b591d2303128c8adcf0bc2c3d 07-Nov-2011 Eric Christopher <echristo@apple.com> Add all completed and named types to the dwarf type accelerator tables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
09ac3d841367d5d56328eade506c951e0dc3a72d 07-Nov-2011 Eric Christopher <echristo@apple.com> Add the support code to enable the dwarf accelerator tables. Upcoming patches
to fix the types section (all types, not just global types), and testcases.

The code to do the final emission is disabled by default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143923 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
c3e48c38bf87ad081904eccf16e4ddd99c36d070 28-Oct-2011 NAKAMURA Takumi <geek4civic@gmail.com> Dwarf: [PR11022] Fix emitting DW_AT_const_value(>i64), to be host-endian-neutral.

Don't assume APInt::getRawData() would hold target-aware endianness nor host-compliant endianness. rawdata[0] holds most lower i64, even on big endian host.

FIXME: Add a testcase for big endian target.

FIXME: Ditto on CompileUnit::addConstantFPValue() ?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143194 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
6a7efcfc02ea5370fb0da66d750165a3ffe93ab7 28-Oct-2011 Nick Lewycky <nicholas@mxc.ca> Always use the string pool, even when it makes the .o larger. This may help
tools that read the debug info in the .o files by making the DIE sizes more
consistent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
390c40d96adb2eb4a778a0890c6c8743057e289e 27-Oct-2011 Nick Lewycky <nicholas@mxc.ca> Teach our Dwarf emission to use the string pool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
746cb670c3cd4f79b288d56d8e9f195685a5381a 27-Oct-2011 Nick Lewycky <nicholas@mxc.ca> Reflow lines, fix comments for doxygen style, fix whitespace. No functionality
change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
8cf5e74a9cc7482901125b810f1e482d24e9404d 03-Oct-2011 Eric Christopher <echristo@apple.com> Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
439780eeaef1a2c6a1105fb705a27c5c819e8d0e 26-Sep-2011 James Molloy <james.molloy@arm.com> Fix emission of debug data for global variables. getContext() on DIGlobalVariables is not valid any more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140539 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
1dd4e56d5565d59e9d40ad9e088a05e06f4b70f8 22-Sep-2011 Devang Patel <dpatel@apple.com> Do not unnecessarily use AT_specification DIE because it does not add any value.

Few weeks ago, llvm completely inverted the debug info graph. Earlier each debug info node used to keep track of its compile unit, now compile unit keeps track of important nodes. One impact of this change is that the global variable's do not have any context, which should be checked before deciding to use AT_specification DIE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140282 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
734a67cda5a02be1654a2f89b811d7b6cbe3f5e5 15-Sep-2011 Devang Patel <dpatel@apple.com> Add support to emit debug info for C++0x nullptr type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139751 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
28bea08e531452992ff1e25e8584883dfbd4c232 19-Aug-2011 Devang Patel <dpatel@apple.com> Eliminate unnecessary forwarding function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
49e2f03849064d9dc26db3865ae419f17daadca6 19-Aug-2011 Devang Patel <dpatel@apple.com> Add new DIE into the map asap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
94c7ddb6f52a5200983fed0ce74dc602a7737879 17-Aug-2011 Devang Patel <dpatel@apple.com> Until now all debug info MDNodes referred to a root MDNode, a compile unit. This simplified handling of these needs in dwarf writer. However, one side effect of this is that during link time optimization all these MDNodes are _not_ uniqued. In other words there will be N number of MDNodes describing "int", "char" and all other types, which would suddenly grow when each object file starts using libraries like STL.

MDNodes graph structure such that compiler unit keeps track of important MDNodes and update dwarf writer to process mdnodes top-down instead of bottom up.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
d0b5a5ece4f6bf1a29bacefcdd07eaa7ba83e316 16-Aug-2011 Devang Patel <dpatel@apple.com> Refactor. Variables are part of compile unit so let CompileUnit create new variable.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
6f9d8ffe5e47e3d11176298e849cc8545c2169a2 15-Aug-2011 Devang Patel <dpatel@apple.com> Refactor. Global variables are part of compile unit so let CompileUnit create new global variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
dbc64af76d769596903485668a1dfc2d6640c4fb 15-Aug-2011 Devang Patel <dpatel@apple.com> Refactor. A subprogram is part of compile unit so let CompileUnit construct new subprogram.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
4ec14b0dee433a4f134d832e326a20839b1f777e 20-Jul-2011 Devang Patel <dpatel@apple.com> While emitting constant value, look through derived type and use underlying basic type to determine size and signness of the constant value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135627 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
8594d429e02c688d428036f8563f09572da3fbff 24-Jun-2011 Devang Patel <dpatel@apple.com> Handle debug info for i128 constants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
c20bdf194ad4c824ee6a5f163410d73513ae5c81 01-Jun-2011 Devang Patel <dpatel@apple.com> Incomplete type may not have corresponding DIE, so do not check DIEEntry eagerly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
66658e4dff51664a53c56dd729b8abe4d57aadef 01-Jun-2011 Devang Patel <dpatel@apple.com> Refactor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132373 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
e9ae06ca987b6c3b6cfbcd50ab85386565a4e0ca 01-Jun-2011 Devang Patel <dpatel@apple.com> Include global types, that are referenced through local variables, in debug_pubtypes list.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
d6a8136e66f0095c7306cad022d792a57e88ba01 28-May-2011 Devang Patel <dpatel@apple.com> Select DW_AT_const_value size based on global variable size.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
045c1d4e48e5e06ca05d04af340f7c487bc9975d 27-May-2011 Devang Patel <dpatel@apple.com> Keep this simple. Use DIType to get signness and size of a type. Based on size, select appropraite form.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
72f0d9cdefa3086715e1e2547a9843321690b4d9 27-May-2011 Devang Patel <dpatel@apple.com> Handle signed types gracefully.
This fixes regressions reported by buildbots as a fallout of r132193.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132197 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
b58128e2b2375173aafb07905bd53014d622e4ba 27-May-2011 Devang Patel <dpatel@apple.com> Select DW_AT_const_value size based on variable size.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
201e6cdc39d5dca4e70cdd331f6f5055b3af3534 12-May-2011 Devang Patel <dpatel@apple.com> Doug convinced me that DW_AT_APPLE_objc_complete_type is more appropriate name.
s/DW_AT_APPLE_objc_class_extension/DW_AT_APPLE_objc_complete_type/g


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
b11f80e94b590c90d07254dfa2406cf504e09cd3 12-May-2011 Devang Patel <dpatel@apple.com> Let Objective-C front-end identify class extension, in dwarf output, using an attribute DW_AT_APPLE_objc_class_extension.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131238 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
31c5d05a26b5b9eec88558d34e9c20d12e0d53d7 06-May-2011 Devang Patel <dpatel@apple.com> Move CompileUnit::getOrCreateNameSpace() and CompileUnit::addPubType() from DwarfDebug.cpp to DwarfCompileUnit.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
c26f5447e39b43a6dd9c1a9d88227f4adf3b5600 28-Apr-2011 Devang Patel <dpatel@apple.com> Teach dwarf writer to handle complex address expression for .debug_loc entries.
This fixes clang generated blocks' variables' debug info.
Radar 9279956.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130373 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
e1cdf84ee5ca72a38f4dedd6b12cce21cf83e415 28-Apr-2011 Devang Patel <dpatel@apple.com> Simplify handling of variables with complex address (i.e. blocks variables)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
116da2fbe93861bb60ffff26dce1d0e76d9ccf15 26-Apr-2011 Devang Patel <dpatel@apple.com> Refactor code. Keep dwarf register operation selection logic at one place.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130231 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
b865d46d95a4c5073d0c006ccc1773641f88fc98 26-Apr-2011 Devang Patel <dpatel@apple.com> Rename a method to match what it really does.
s/addVariableAddress/addFrameVariableAddress/g


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
e9db5e29e3af91eec572bfeb8dcec908213298b0 16-Apr-2011 Devang Patel <dpatel@apple.com> Introduce support to encode Objective-C property information in debugging information generated for an interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
161b2f45c2413a9aa3bb3003d043f58c21dfd319 13-Apr-2011 Devang Patel <dpatel@apple.com> I missed this new file in previous commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp