- Nov 16, 2013
-
-
David Blaikie authored
DwarfCompileUnit: Add type safety by using DICompileUnit rather than raw MDNode* for the CU metadata node llvm-svn: 194893
-
David Blaikie authored
llvm-svn: 194892
-
Adrian Prantl authored
llvm-svn: 194883
-
David Blaikie authored
llvm-svn: 194879
-
David Blaikie authored
llvm-svn: 194875
-
- Nov 15, 2013
-
-
David Blaikie authored
This is the first of a few similar patches. We'll see how far it goes/makes sense. llvm-svn: 194871
-
Adrian Prantl authored
llvm-svn: 194848
-
Adrian Prantl authored
If getDIE() fails, getOrCreateContextDIE() should also return the CUDie. llvm-svn: 194843
-
Eric Christopher authored
DbgVariable. No functional change. llvm-svn: 194761
-
- Nov 14, 2013
-
-
David Blaikie authored
llvm-svn: 194737
-
David Blaikie authored
llvm-svn: 194728
-
David Blaikie authored
llvm-svn: 194724
-
Rafael Espindola authored
In ELF and COFF an alias is just another offset in a section. There is no way to represent an alias to something in another file. In MachO, the spec has the N_INDR type which should allow for exactly that, but is not currently implemented. Given that it is specified but not implemented, we error in codegen to avoid miscompiling but don't reject aliases to declarations in the verifier to leave the option open of implementing it. In the past we have used alias to declarations as a way of implementing weakref, which is why it exists in some old tests which this patch updates. llvm-svn: 194705
-
- Nov 13, 2013
-
-
David Blaikie authored
DIEHash: Move header include to be first in the implementation file to flush out header inclusion ordering issues llvm-svn: 194588
-
- Nov 11, 2013
-
-
Eric Christopher authored
llvm-svn: 194401
-
Eric Christopher authored
llvm-svn: 194400
-
Eric Christopher authored
llvm-svn: 194399
-
Eric Christopher authored
llvm-svn: 194398
-
- Nov 10, 2013
-
-
Matt Arsenault authored
This should be inconsequential and is work towards removing the default address space arguments. llvm-svn: 194347
-
- Nov 02, 2013
-
-
Eric Christopher authored
llvm-svn: 193894
-
- Nov 01, 2013
-
-
Rafael Espindola authored
linkonce_odr_auto_hide was in incomplete attempt to implement a way for the linker to hide symbols that are known to be available in every TU and whose addresses are not relevant for a particular DSO. It was redundant in that it all its uses are equivalent to linkonce_odr+unnamed_addr. Unlike those, it has never been connected to clang or llvm's optimizers, so it was effectively dead. Given that nothing produces it, this patch just nukes it (other than the llvm-c enum value). llvm-svn: 193865
-
David Blaikie authored
Drive by space optimization. Also makes the DIEs more regular which might speed up DWARF parsing. llvm-svn: 193835
-
- Oct 31, 2013
-
-
Manman Ren authored
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. llvm-svn: 193779
-
- Oct 30, 2013
-
-
Rafael Espindola authored
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
-
David Blaikie authored
This is a preliminary step to handling type units by abstracting over all (type or compile) units. llvm-svn: 193714
-
David Blaikie authored
llvm-svn: 193699
-
Manman Ren authored
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
-
- Oct 29, 2013
-
-
Manman Ren authored
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
-
Manman Ren authored
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
-
Rafael Espindola authored
This allows constructing a Mangler with just a TargetMachine. llvm-svn: 193630
-
Rafael Espindola authored
llvm-svn: 193627
-
Manman Ren authored
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
-
Manman Ren authored
This commit ensures DIEs are constructed within a compile unit and immediately added to their parents. Reviewed off-list by Eric. llvm-svn: 193568
-
Manman Ren authored
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
-
Manman Ren authored
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
-
- Oct 25, 2013
-
-
David Blaikie authored
llvm-svn: 193432
-
David Blaikie authored
llvm-svn: 193427
-
David Blaikie authored
MCStreamer: Reimplement the virtual EmitRawText as a protected member, 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
-
David Blaikie authored
The default case at the end of the switch handles this just fine. llvm-svn: 193374
-
- Oct 24, 2013
-
-
Eric Christopher authored
llvm-svn: 193373
-