| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this patch llvm produces a weak_def_can_be_hidden for linkonce_odr
if they are also unnamed_addr or don't have their address taken.
There is not a lot of documentation about .weak_def_can_be_hidden, but
from the old discussion about linkonce_odr_auto_hide and the name of
the directive this looks correct: these symbols can be hidden.
Testing this with the ld64 in Xcode 5 linking clang reduces the number of
exported symbols from 21053 to 19049.
llvm-svn: 193718
|
| |
|
|
|
|
|
| |
This is a preliminary step to handling type units by abstracting over
all (type or compile) units.
llvm-svn: 193714
|
| |
|
|
| |
llvm-svn: 193699
|
| |
|
|
|
|
|
|
|
|
| |
Use EmitLabelOffsetDifference for handling on darwin platform when
non-darwin platforms use EmitLabelPlusOffset.
Also fix a bug in EmitLabelOffsetDifference where the size is hard-coded
to 4 even though Size is passed in as an argument.
llvm-svn: 193660
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 193658
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 193657
|
| |
|
|
|
|
| |
This allows constructing a Mangler with just a TargetMachine.
llvm-svn: 193630
|
| |
|
|
| |
llvm-svn: 193627
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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(".
llvm-svn: 193589
|
| |
|
|
|
|
|
|
|
| |
This commit ensures DIEs are constructed within a compile unit and
immediately added to their parents.
Reviewed off-list by Eric.
llvm-svn: 193568
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 193567
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 193566
|
| |
|
|
| |
llvm-svn: 193432
|
| |
|
|
| |
llvm-svn: 193427
|
| |
|
|
|
|
|
|
|
|
| |
EmitRawTextImpl, to avoid string literal ambiguities
Also improve the implementation of EmitRawText(Twine) so it doesn't
bother using the SmallString buffer if the Twine is a simple StringRef
anyway.
llvm-svn: 193378
|
| |
|
|
|
|
| |
The default case at the end of the switch handles this just fine.
llvm-svn: 193374
|
| |
|
|
| |
llvm-svn: 193373
|
| |
|
|
| |
llvm-svn: 193372
|
| |
|
|
| |
llvm-svn: 193371
|
| |
|
|
| |
llvm-svn: 193363
|
| |
|
|
| |
llvm-svn: 193361
|
| |
|
|
| |
llvm-svn: 193360
|
| |
|
|
|
|
|
| |
This may've been used at some point but the 'print' member function grew
an Indent parameter that entirely shadows this parameter.
llvm-svn: 193358
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 193287
|
| |
|
|
|
|
|
| |
Rename createMemberDIE to constructMemberDIE to match other construct functions
in CompileUnit.
llvm-svn: 193286
|
| |
|
|
|
|
|
| |
Remove the unneeded return values from createMemberDIE, constructEnumTypeDIE,
getOrCreateTemplateTypeParameterDIE, and getOrCreateTemplateValueParameterDIE.
llvm-svn: 193285
|
| |
|
|
|
|
|
|
|
| |
Unifying the argument ordering of private construct functions in CompileUnit to
follow constructTypeDIE(DIE &, DIBasicType),
constructTypeDIE(DIE &, DIDerivedType), constructTypeDIE(DIE &, DICompositeType),
constructSubrangeDIE and constructArrayTypeDIE.
llvm-svn: 193284
|
| |
|
|
| |
llvm-svn: 193276
|
| |
|
|
| |
llvm-svn: 193272
|
| |
|
|
|
|
|
|
|
|
|
| |
Remove unnecessary creation of LexicalScope in collectDeadVariables.
The created LexicialScope was only used to get isAbstractScope, which
should be false from the creation:
"new LexicalScope(NULL, DIDescriptor(SP), NULL, false);".
We can also remove a DenseMap that holds the created LexicalScopes.
llvm-svn: 193196
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Since (as of r190716) Clang no longer emits debug info for C++ friend
declarations (and it seems GCC never has/does, which was the motivation
for the Clang change), there's no actual reachable case for implementing
the part of DWARF 4, Section 7.27 part 5 that pertains to friends.
Leave an assert here so that if/when we do have a client producing
friends and using type units, we can fill in the gap and add appropriate
(unit and feature) tests.
llvm-svn: 193193
|
| |
|
|
|
|
|
|
|
| |
Includes a test case/FIXME demonstrating a bug/limitation in pointer to
member hashing. To be honest I'm not sure why we don't just always use
summary hashing for referenced types... but perhaps I'm missing
something.
llvm-svn: 193175
|
| |
|
|
| |
llvm-svn: 193135
|
| |
|
|
|
|
|
|
| |
declarable summary hashing path
More support for 7.25 Part 5.
llvm-svn: 193129
|
| |
|
|
|
|
|
|
|
| |
contexts
There are several other tag types that need similar handling but to
ensure test coverage they'll be coming incrementally.
llvm-svn: 193126
|
| |
|
|
| |
llvm-svn: 193111
|
| |
|
|
| |
llvm-svn: 193106
|
| |
|
|
|
|
|
|
|
|
| |
same type
This uses a map, keeping the type DIE numbering separate from the DIEs
themselves - alternatively we could do things the way GCC does if we
want to add an integer to the DIE type to record the numbering there.
llvm-svn: 193105
|
| |
|
|
| |
llvm-svn: 193095
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 193091
|
| |
|
|
|
|
|
|
|
|
| |
Found while adding type safety to the various DWARF enumerations (form,
attribute, tag, etc) that caused Clang to warn on an incompletely
covered switch. Converting the comment to a default/unreachable
uncovered this case of an unsupported form encoding. Seems we were
skipping fission strings entirely.
llvm-svn: 193089
|
| |
|
|
|
|
|
|
|
| |
This ensures that the prefix data is treated as part of the function for
the purpose of debug info. This provides a better debugging experience,
among other things by allowing a debug info client to correctly look up
a function in debug info given a function pointer.
llvm-svn: 193042
|
| |
|
|
| |
llvm-svn: 193038
|
| |
|
|
| |
llvm-svn: 193024
|
| |
|
|
| |
llvm-svn: 193023
|
| |
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 193002
|
| |
|
|
| |
llvm-svn: 193001
|
| |
|
|
|
|
| |
error messages should not be able to occur at the same time.
llvm-svn: 192985
|
| |
|
|
|
|
| |
requires a more in depth change to the IR structure.
llvm-svn: 192938
|
| |
|
|
|
|
|
| |
Makes the uses more terse and requires that they use a semicolon at the
end that helps editors indent proceeding lines correctly.
llvm-svn: 192925
|