Benjamin Kramer
6a44af3629
Give internal classes hidden visibility.
...
Worth 100k on a linux/x86_64 Release+Asserts clang.
llvm-svn: 190534
2013-09-11 17:42:27 +00:00
Eric Christopher
31b0576b01
Be more rigorous about the sizes of forms and attributes.
...
llvm-svn: 187953
2013-08-08 01:41:00 +00:00
Eric Christopher
8552e22b07
Add a way to grab a particular attribute out of a DIE.
...
Use it when we're looking for a string in particular. Update comments
as well.
llvm-svn: 187844
2013-08-07 01:18:33 +00:00
Eric Christopher
67646438c9
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.
llvm-svn: 187213
2013-07-26 17:02:41 +00:00
Manman Ren
ac8062bb72
Debug Info: use module flag to set up Dwarf version.
...
Correctly handles ref_addr depending on the Dwarf version. Emit Dwarf with
version from module flag.
TODO: turn on/off features depending on the Dwarf version.
llvm-svn: 185484
2013-07-02 23:40:10 +00:00
Ulrich Weigand
396ba8b495
[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.
llvm-svn: 185458
2013-07-02 18:46:26 +00:00
David Blaikie
f3cd7c5115
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.
llvm-svn: 185202
2013-06-28 20:05:04 +00:00
Eric Christopher
773c155c15
Formatting.
...
llvm-svn: 183807
2013-06-11 23:41:38 +00:00
Eric Christopher
2280c5baa6
Fix up comment.
...
llvm-svn: 183703
2013-06-10 22:24:07 +00:00
Eric Christopher
8c47bb1a02
Remove unused function.
...
llvm-svn: 183698
2013-06-10 21:59:28 +00:00
Eric Christopher
b7e3b42c01
IndentCount is only used within NDEBUG code.
...
llvm-svn: 183695
2013-06-10 20:58:53 +00:00
Eric Christopher
65ac02ad78
Const-ify some printing and dumping code for DIEValues.
...
llvm-svn: 183057
2013-05-31 22:50:40 +00:00
Eric Christopher
8fd7ab07ca
Make getCompileUnit non-const and return the current DIE if it
...
happens to be a compile unit. Noticed on inspection and tested
via calling on a newly created compile unit. No functional change.
llvm-svn: 181835
2013-05-14 21:33:10 +00:00
David Blaikie
7b770c6aed
Assert that DIEEntries are constructed with non-null DIEs
...
This just brings a crash a little further forward from DWARF emission to
DIE construction to make errors easier to diagnose.
llvm-svn: 181748
2013-05-14 00:35:19 +00:00
Eric Christopher
6c6de847a8
Remove unnecessary instance variable and rework logic accordingly.
...
llvm-svn: 181227
2013-05-06 17:50:50 +00:00
Manman Ren
bdcb4464e2
Debug Info: revert 178722 for now.
...
There is a difference for FORM_ref_addr between DWARF 2 and DWARF 3+.
Since Eric is against guarding DWARF 2 ref_addr with DarwinGDBCompat, we are
still in discussion on how to handle this.
The correct solution is to update our header to say version 4 instead of version
2 and update tool chains as well.
rdar://problem/13559431
llvm-svn: 178806
2013-04-04 23:13:11 +00:00
Manman Ren
5a15c9ed9f
Debug Info: according to DWARF 2, FORM_ref_addr the same size as an address on
...
the target system.
It was hard-coded to 4 bytes before. I can't get llvm to generate a
ref_addr on a reasonably sized testing case.
rdar://problem/13559431
llvm-svn: 178722
2013-04-04 00:22:54 +00:00
Eric Christopher
14c2067ca1
Fix grammar.
...
llvm-svn: 178624
2013-04-03 05:29:58 +00:00
Eric Christopher
4887c8f4ff
Use SmallVectorImpl instead of SmallVector at the uses.
...
llvm-svn: 178386
2013-03-29 23:34:06 +00:00
Eric Christopher
9c8414f84a
Use 12 as the magic number for our abbreviation data and our
...
die values. A lot of DIEs have 10 attributes in C++ code (example
clang), none had more than 12. Seems like a good default.
llvm-svn: 178366
2013-03-29 20:23:06 +00:00
Hans Wennborg
7504cefa14
Fix integer comparison in DIEInteger::BestForm.
...
The always-true "(int)Int == (signed)Int" comparison was found
while experimenting with a potential new Clang warning.
llvm-svn: 177290
2013-03-18 17:03:05 +00:00
Manman Ren
14a029d9f3
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
llvm-svn: 176882
2013-03-12 18:27:15 +00:00
Eric Christopher
b800ff70c5
Whitespace and 80-col.
...
llvm-svn: 171803
2013-01-07 22:40:45 +00:00
Bill Wendling
3d7b0b8ac7
Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.
...
llvm-svn: 170502
2012-12-19 07:18:57 +00:00
Sean Silva
506a1c5a58
Remove unnecessary classof()'s
...
isa<> et al. automatically infer when the cast is an upcast (including a
self-cast), so these are no longer necessary.
llvm-svn: 165767
2012-10-11 23:30:49 +00:00
Benjamin Kramer
8aefffca4c
Bit pack DIE structures better.
...
16 bits are sufficient to store attributes, tags and forms.
llvm-svn: 148799
2012-01-24 12:08:28 +00:00
Eric Christopher
3e8ccc2000
Remove generation of DW_AT_sibling. Nothing as far as I can tell uses it.
...
Saves about 1.5% on debug info size.
rdar://10278198
llvm-svn: 148794
2012-01-24 09:43:28 +00:00
David Blaikie
a379b18173
Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
...
llvm-svn: 146960
2011-12-20 02:50:00 +00:00
Nick Lewycky
cc64ae140d
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.
llvm-svn: 143186
2011-10-28 05:29:47 +00:00
Nick Lewycky
d75675ab3b
Remove dead enum value. There is no DIESectionOffset.
...
llvm-svn: 142912
2011-10-25 07:05:26 +00:00
Nick Lewycky
5ca33ac926
Fix some typo/formatting issues. No functionality change.
...
llvm-svn: 142435
2011-10-18 22:39:43 +00:00
Benjamin Kramer
84fccb64c3
Remove unused virtual dtor.
...
llvm-svn: 127331
2011-03-09 14:20:28 +00:00
Cameron Zwarich
fcf51fd298
Roll out r126425 and r126450 to see if it fixes the failures on the buildbots.
...
llvm-svn: 126488
2011-02-25 16:30:32 +00:00
Devang Patel
b037383a35
Enable DebugInfo support for COFF object files.
...
Patch by Nathan Jeffords!
llvm-svn: 126425
2011-02-24 21:04:00 +00:00
Devang Patel
9fc11706e3
First cut at supporting .debug_loc section.
...
This is used to track variable information.
llvm-svn: 104649
2010-05-25 23:40:22 +00:00
Devang Patel
12563b3495
Add support to emit dwarf ranges.
...
llvm-svn: 101575
2010-04-16 23:33:45 +00:00
Chris Lattner
5a00dea332
change SizeOf to take AsmPrinter instead of TargetData,
...
simplifying a bunch of code.
llvm-svn: 100373
2010-04-05 00:18:22 +00:00
Chris Lattner
3a383cb7d9
1) make DIE take AsmPrinter instead of DwarfPrinter.
...
2) change DwarfDebug to not inherit from DwarfPrinter.
llvm-svn: 100372
2010-04-05 00:13:49 +00:00
Benjamin Kramer
74729ae094
DwarfDebug: Allocate DIEValues with a BumpPtrAllocator. Most of them are
...
POD-like anyway, so we don't even care about calling their d'tors (DIEBlock
being the exception).
~6% less mallocs and ~1% compile time improvement on clang -O0 -g oggenc.c
llvm-svn: 100035
2010-03-31 19:34:01 +00:00
Devang Patel
53e91f0836
DW_AT_stmt_list attribute attached with a compile unit encodes offset of line number information for this compile unit in debug_line section. This offset is always zero when only one compile unit is emitted in a object file.
...
llvm-svn: 99223
2010-03-22 22:38:48 +00:00
Jeffrey Yasskin
54ebc986b1
Fix a memory leak from DIE::addSiblingOffset() by adding the DIEValue
...
it allocates to DwarfDebug::DIEValues.
llvm-svn: 99196
2010-03-22 18:47:14 +00:00
Jeffrey Yasskin
35b4e4f641
Free DbgScopes in DwarfDebug::endFunction(). Also increased the const-ness of
...
several fields to make it easier to figure out where bugs might be creeping in.
llvm-svn: 98358
2010-03-12 17:45:06 +00:00
Chris Lattner
27a9732450
simplify EmitSectionOffset to always use .set if it is
...
available, the only thing this affects is that we produce
.set in one case we didn't before, which shouldn't harm
anything. Make EmitSectionOffset call EmitDifference
instead of duplicating it.
llvm-svn: 98005
2010-03-08 23:23:25 +00:00
Chris Lattner
8dcf41ed66
merge DIEObjectLabel and DIEDwarfLabel into DIELabel.
...
Yes, DIE you fiendish labels, die all of you.
llvm-svn: 97995
2010-03-08 22:31:46 +00:00
Chris Lattner
bc9210cb70
elimiante the DWLabel class, using MCSymbol instead. Start
...
switching some stuff over to passing around MCSymbol* instead
of stem+ID.
llvm-svn: 97993
2010-03-08 22:23:36 +00:00
Douglas Gregor
9abb538be0
Revert r97917, which was causing Clang Debug self-host failures.
...
llvm-svn: 97932
2010-03-08 02:58:37 +00:00
Jeffrey Yasskin
37a0372fc4
Roll r97906 forward again, without double-deleting CompileUnit::IndexTyDie.
...
llvm-svn: 97917
2010-03-07 17:10:13 +00:00
Chris Lattner
ded9af63bb
teach MCAsmStreamer::EmitBytes to use .ascii and .asciz
...
llvm-svn: 94259
2010-01-23 00:15:00 +00:00
Chris Lattner
fa82355f33
move uleb printing from asmprinter to dwarfprinter, mcize,
...
cleanup and eliminate a bunch more uses of "EOL".
llvm-svn: 94250
2010-01-22 23:18:42 +00:00
Chris Lattner
69bb026835
rename the dwarf class to DwarfPrinter. This matches the filename
...
and much more accurately describes what it is all about.
llvm-svn: 94233
2010-01-22 22:23:57 +00:00