Commit Graph

568 Commits

Author SHA1 Message Date
Douglas Gregor
cabdd7425d Fix a bunch of little errors that Clang complains about when its being pedantic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91764 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-19 07:05:23 +00:00
Bill Wendling
aeb79aea8f Temporarily revert 91337. It's causing testcase failures.
$ svn merge -c -91337 https://llvm.org/svn/llvm-project/llvm/trunk
--- Reverse-merging r91337 into '.':
U    lib/CodeGen/AsmPrinter/DwarfException.cpp



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91618 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-17 20:41:01 +00:00
Devang Patel
6404e4e795 Add support to emit debug info for C++ namespaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91440 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 19:16:48 +00:00
Chris Lattner
4bbf4ee149 Remove isPod() from DenseMapInfo, splitting it out to its own
isPodLike type trait.  This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91421 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 07:26:43 +00:00
Bill Wendling
f8084fb1e1 The CIE says that the LSDA point in the FDE section is an "sdata4". That's fine,
but we need it to actually be 4-bytes in the FDE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91337 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-14 21:49:44 +00:00
Devang Patel
ffe966c15b Use DW_AT_specification to point to DIE describing function declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91278 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-14 16:18:45 +00:00
Devang Patel
d037d7a497 Construct CompileUnits lazily.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91159 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 21:37:07 +00:00
Devang Patel
edb4563cea If VariableDIe is not created (may be because global was optimzed away) then do not try to use the variable die.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91077 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-10 23:25:41 +00:00
Devang Patel
c366f83d89 Refactor code that finds context for a given die.
Create global variable DIEs after creating subprogram DIEs. This allows function level static variable's to find their context at the time of DIE creation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91055 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-10 19:14:49 +00:00
Devang Patel
16ced733f3 Refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91051 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-10 18:05:33 +00:00
Devang Patel
8a24114b16 Reapply r90858, a cleanup patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90979 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 18:24:21 +00:00
Devang Patel
0000fadb00 Revert 90858 90875 and 90805 for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90898 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 23:21:45 +00:00
Devang Patel
a3a60c6c49 Cleanup.
There is no need to supply ModuleCU to addType() as a parameter.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90858 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 15:31:31 +00:00
Devang Patel
018b66038c Do not try to push dead variable's debug info into namespace info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90857 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 15:01:35 +00:00
Devang Patel
4063f6bcc7 Add support to emit debug info for c++ style namespaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90805 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 21:41:32 +00:00
Dan Gohman
b3b9821cde Don't print a space before the : between the file name and line number.
And separate the directory and file name with a '/'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90641 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 02:00:34 +00:00
Dan Gohman
eecb9919a4 Print newlines after printing labels for debug info, so that the output
isn't cluttered with things like "Llabel47:Llabel48:  movq  (%rsi), %xmm3"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 01:42:34 +00:00
Dan Gohman
3b9bc04eda Fix this code to use DIScope instead of DICompileUnit, as in r90181.
Don't print "SrcLine"; just print the filename and line number, which
is obvious enough and more informative.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90631 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 00:23:29 +00:00
Dan Gohman
fcafe44f56 Print a space between the comment character and the text.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90621 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 23:19:55 +00:00
Devang Patel
d55224c25e In TAG_subrange_type, uppder bound is zero indexed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90617 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 23:10:24 +00:00
David Greene
f7ea2a534b Use new interfaces to print spill size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90611 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 22:46:04 +00:00
Devang Patel
b3235d22e9 Insert composite type DIE into the map before processing type fields. This allows fields to find their context DIE from the map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90498 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 23:46:57 +00:00
Devang Patel
5d11eb0ed5 Add support to emit debug info for virtual functions and virtual base classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90474 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 19:11:07 +00:00
Devang Patel
1d5cc1db59 Emit method definition DIE at module level (even for methods with inlined functino body at soure level) so that the debugger can invoke it. This fixes many test failures in gdb test suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90375 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 01:25:38 +00:00
Devang Patel
69f57b1f41 Clarify that DIEString does not keep a copy of the string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90318 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 15:25:16 +00:00
Devang Patel
7d0750a10f Reuse existing subprogram DIE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90281 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 23:07:59 +00:00
Devang Patel
c09ddc1c79 Clear function specific containers while processing end of a function, even if DW_TAG_subprogram for current function is not found.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90247 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 18:13:48 +00:00
Devang Patel
deea564e53 If pointer type has a name then do not ignore the name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90172 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 23:56:56 +00:00
Benjamin Kramer
1c3451fc99 Avoid some possibly unsafe uses of StringRef::data().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89873 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 18:26:09 +00:00
Devang Patel
65dbc909f5 Use StringRef (again) in DebugInfo interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89866 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 17:36:49 +00:00
Devang Patel
e9a059714e Use StringRef instead of std::string in DIEString.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89793 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-24 19:42:17 +00:00
Devang Patel
f3a0376a56 Swith to pubtypes section before emitting pub types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89787 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-24 19:18:41 +00:00
Devang Patel
193f720f11 Emit pubtypes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89725 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-24 01:14:22 +00:00
Dan Gohman
277207e6cb Simplify this code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89702 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23 21:30:55 +00:00
Devang Patel
05f6fa874e Revert r89487.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89686 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23 18:43:37 +00:00
Jim Grosbach
a2f20b20a8 Add getFrameIndexReference() to TargetRegisterInfo, which allows targets to
tell debug info which base register to use to reference a frame index on a
per-index basis. This is useful, for example, in the presence of dynamic
stack realignment when local variables are indexed via the stack pointer and
stack-based arguments via the frame pointer.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89620 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22 20:14:00 +00:00
Jim Grosbach
7ab38dfccb 80-column cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89612 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22 19:20:36 +00:00
Jim Grosbach
31ef40e940 remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89567 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21 23:12:12 +00:00
Devang Patel
2c4ceb177b Cosmetic changes, which were long overdue, in DwarfDebug.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89537 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21 02:48:08 +00:00
Devang Patel
9bff5cbae8 Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89522 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21 00:54:03 +00:00
Devang Patel
6f01d9c2f0 There is no need to use FoldingSet to unique DIEs.
DIEs are created from MDNode, which are already uniqued. And DwarfDebug already uses ValueMaps to find and use existing DIE for a given MDNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89518 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21 00:31:03 +00:00
Dan Gohman
29cbade25a Target-independent support for TargetFlags on BlockAddress operands,
and support for blockaddresses in x86-32 PIC mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89506 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 23:18:13 +00:00
Devang Patel
017d121c59 Do not hold on to a map slot while new entries may be inserted into the map.
Use ValueMap, instead of std::map.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89490 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 21:37:22 +00:00
Devang Patel
1f37b5b3af There is no need to emit source location info for DW_TAG_pointer_type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89487 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 21:05:37 +00:00
Bill Wendling
fb7634f1c7 Reverting the EH table patches.
$ svn merge -c -89279 https://llvm.org/svn/llvm-project/llvm/trunk
--- Reverse-merging r89279 into '.':
U    lib/CodeGen/AsmPrinter/DwarfException.cpp
U    lib/Target/TargetLoweringObjectFile.cpp
$ svn merge -c -89270 https://llvm.org/svn/llvm-project/llvm/trunk
--- Reverse-merging r89270 into '.':
G    lib/CodeGen/AsmPrinter/DwarfException.cpp
G    lib/Target/TargetLoweringObjectFile.cpp



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89379 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 19:21:09 +00:00
Bill Wendling
01c69374b5 The "ReadOnlyWithRel" enum seems to apply more to what Darwin does with the EH
exception table than DataRel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89279 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 00:09:14 +00:00
Bill Wendling
ec04458551 Attempt #2:
Place the EH table in the __TEXT section on MachO. It saves space.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89270 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-18 23:18:46 +00:00
Nick Lewycky
381afae68f Remove VISIBILITY_HIDDEN from the classes in this directory. Fixes bug 5507.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89075 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 09:17:08 +00:00
Nick Lewycky
5f9843f68f Revert r88939.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89066 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 08:11:44 +00:00
Bill Wendling
7378b1bd00 Refactor the code that creates the "dot-label" difference. This may be used in
more than one place. No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89024 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 01:23:53 +00:00