Dan Gohman
d159b46665
Fix the label name generation for address-taken labels to avoid potential
...
problems with name collisions.
llvm-svn: 86189
2009-11-05 23:14:35 +00:00
Devang Patel
c69c29bc4b
While calculating original type size for a derived type, handle type variants encoded as DIDerivedType appropriately.
...
This improves bitfield support.
llvm-svn: 86073
2009-11-04 23:48:00 +00:00
Devang Patel
799b8cc191
Fix DW_AT_data_member_location for bit-fields. It points to the location of annonymous field that covers respective field.
...
llvm-svn: 86054
2009-11-04 22:06:12 +00:00
Devang Patel
773993746e
Array element size does not match array size but array is not a bitfield.
...
llvm-svn: 86043
2009-11-04 19:37:40 +00:00
Jakob Stoklund Olesen
f775e222e0
Print out an informative comment for KILL instructions.
...
The KILL pseudo-instruction may survive to the asm printer pass, just like the IMPLICIT_DEF. Print the KILL as a comment instead of just leaving a blank line in the output.
With -asm-verbose=0, a blank line is printed, like IMPLICIT?DEF.
llvm-svn: 86041
2009-11-04 19:24:37 +00:00
Devang Patel
7cb7017106
Ignore unnamed variables.
...
llvm-svn: 85909
2009-11-03 18:30:27 +00:00
Jeffrey Yasskin
bc6f9d7e70
Fix a funky "declared with greater visibility than the type of its field"
...
warning from gcc by removing VISIBILITY_HIDDEN attributes.
llvm-svn: 85873
2009-11-03 06:29:36 +00:00
Dan Gohman
423e97a5ad
Fix a missing newline in the dwarf output code.
...
llvm-svn: 85684
2009-10-31 20:59:09 +00:00
Dan Gohman
468aef9289
Add support for BlockAddress static initializers.
...
llvm-svn: 85562
2009-10-30 01:45:18 +00:00
Dan Gohman
aa62f675db
Add a FIXME comment.
...
llvm-svn: 85559
2009-10-30 01:38:20 +00:00
Dan Gohman
a0fc491716
Add some comments.
...
llvm-svn: 85558
2009-10-30 01:34:35 +00:00
Dan Gohman
6b7d1390d7
Initial target-independent CodeGen support for BlockAddresses.
...
llvm-svn: 85556
2009-10-30 01:27:03 +00:00
Devang Patel
635c6192e6
Do not held on to DenseMap slot accross map insertion. The insertion may cause the map to grow rending the slot invalid.
...
Use this opportunity to use ValueMap instead of DenseMap.
llvm-svn: 85298
2009-10-27 20:47:17 +00:00
Nick Lewycky
2b8400628d
Remove includes of Support/Compiler.h that are no longer needed after the
...
VISIBILITY_HIDDEN removal.
llvm-svn: 85043
2009-10-25 06:57:41 +00:00
Nick Lewycky
711c726c97
Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.
...
Chris claims we should never have visibility_hidden inside any .cpp file but
that's still not true even after this commit.
llvm-svn: 85042
2009-10-25 06:33:48 +00:00
Bill Wendling
c6d3a6ed66
Tidying up some code and comments. No functionality change.
...
llvm-svn: 84894
2009-10-22 20:48:59 +00:00
Devang Patel
4790ea6ca2
Do not emit name entry for a pointer type.
...
llvm-svn: 84276
2009-10-16 21:27:43 +00:00
Devang Patel
5920acc861
If there is not any llvm instruction associated with each lexical scope encoded in debug info then create such scope on demand for variable info.
...
llvm-svn: 84262
2009-10-16 18:18:03 +00:00
Devang Patel
22761afada
Add support to record DbgScope as inlined scope.
...
llvm-svn: 84134
2009-10-14 21:08:09 +00:00
Devang Patel
72f708ec2f
s/DebugLoc.CompileUnit/DebugLoc.Scope/g
...
s/DebugLoc.InlinedLoc/DebugLoc.InlinedAtLoc/g
llvm-svn: 84054
2009-10-13 23:28:53 +00:00
Daniel Dunbar
592c5055dd
Fix a -Asserts warning.
...
llvm-svn: 83950
2009-10-13 06:47:08 +00:00
Devang Patel
aeac1241b8
Find enclosing subprogram info.
...
llvm-svn: 83922
2009-10-12 23:11:24 +00:00
Devang Patel
c97c44b584
Extract scope information from the variable itself, instead of relying on alloca or llvm.dbg.declare location.
...
While recording beginning of a function, use scope info from the first location entry instead of just relying on first location entry itself.
llvm-svn: 83684
2009-10-09 22:42:28 +00:00
Devang Patel
a772046766
Check invalid debug info for enums. This may happen when underlyng enum is optimized away. Eventually DwarfChecker will clean this up during llvm verification stage.
...
llvm-svn: 83655
2009-10-09 17:51:49 +00:00
Devang Patel
e16aac2206
Do not record line number to implicitly mark start of function if function has arguments. Extra line number entries trip gdb in some cases.
...
llvm-svn: 83563
2009-10-08 18:48:03 +00:00
Devang Patel
1639c0e45a
Add support to handle debug info attached to an instruction.
...
This is not yet enabled.
llvm-svn: 83400
2009-10-06 18:37:31 +00:00
Dan Gohman
a803c712dd
Instead of printing unnecessary basic block labels as labels in
...
verbose-asm mode, print comments instead. This eliminates a non-comment
difference between verbose-asm mode and non-verbose-asm mode.
Also, factor out the relevant code out of all the targets and into
target-independent code.
llvm-svn: 83392
2009-10-06 17:38:38 +00:00
Devang Patel
bad114ca60
Fix cut-n-pasto.
...
llvm-svn: 83367
2009-10-06 03:15:38 +00:00
Devang Patel
a8f35ac640
Update processDebugLoc() so that it can be used to process debug info before and after printing an instruction.
...
llvm-svn: 83363
2009-10-06 02:19:11 +00:00
Devang Patel
3200e99109
Remove dead code.
...
llvm-svn: 83362
2009-10-06 02:01:32 +00:00
Devang Patel
0141a90812
Add utility routine to set begin and end labels for DbgScopes.
...
This will be used by processDebugLoc().
llvm-svn: 83361
2009-10-06 01:50:42 +00:00
Devang Patel
2001f5878b
Remove unintentional function decl.
...
llvm-svn: 83356
2009-10-06 01:31:35 +00:00
Devang Patel
ac511d1acf
Add utility routine to collect variable debug info. This is not yet used.
...
llvm-svn: 83355
2009-10-06 01:26:37 +00:00
Devang Patel
3b3d8a9d09
Existence of a compile unit for input source file is a good indicator to check debug info's presence in a module.
...
llvm-svn: 83348
2009-10-06 00:03:14 +00:00
Devang Patel
f129b0d44f
If subprogram die is not available then construct new one.
...
This can happen if debug info is processed lazily.
llvm-svn: 83347
2009-10-05 23:59:00 +00:00
Devang Patel
dff583ac49
Adjust context for the global variables that are not at file scope, e.g.
...
void foo() { static int bar = 42; }
Here, foo's DIE is parent of bar's DIE.
llvm-svn: 83344
2009-10-05 23:40:42 +00:00
Devang Patel
4e9591a170
Set address while constructing DIE.
...
llvm-svn: 83343
2009-10-05 23:22:08 +00:00
Devang Patel
28b7c6155c
Gracefully handle various scopes while recording source line info.
...
llvm-svn: 83317
2009-10-05 18:03:19 +00:00
Chris Lattner
a3cf123e86
strength reduce a ton of type equality tests to check the typeid (Through
...
the new predicates I added) instead of going through a context and doing a
pointer comparison. Besides being cheaper, this allows a smart compiler
to turn the if sequence into a switch.
llvm-svn: 83297
2009-10-05 05:54:46 +00:00
Devang Patel
7aa19711f8
Add support to extract lexical scope information from DebugLoc attached with an machine instruction.
...
This is not yet enabled.
llvm-svn: 83210
2009-10-01 20:31:14 +00:00
Devang Patel
7b4ba71afa
Record first and last instruction of a scope in DbgScope.
...
llvm-svn: 83207
2009-10-01 18:25:23 +00:00
Devang Patel
4f1147e386
Add another MDNode into DebugLocTuple. This will be used to keep track of inlined functions.
...
llvm-svn: 83190
2009-10-01 01:15:28 +00:00
Devang Patel
e097bf49d0
Use MachineInstr as an processDebugLoc() argument.
...
This will allow processDebugLoc() to handle scopes for DWARF debug info.
llvm-svn: 83183
2009-09-30 23:12:50 +00:00
Devang Patel
044648c2d7
Use MDNode * directly as an RecordSourceLine() argument.
...
llvm-svn: 83182
2009-09-30 22:51:28 +00:00
Bob Wilson
1cf44c8225
Add a new virtual EmitStartOfAsmFile method to the AsmPrinter and use this
...
to emit target-specific things at the beginning of the asm output. This
fixes a problem for PPC, where the text sections are not being kept together
as expected. The base class doInitialization code calls DW->BeginModule()
which emits a bunch of DWARF section directives. The PPC doInitialization
code then emits all the TEXT section directives, with the intention that they
will be kept together. But as I understand it, the Darwin assembler treats
the default TEXT section as a special case and moves it to the beginning of
the file, which means that all those DWARF sections are in the middle of
the text. With this change, the EmitStartOfAsmFile hook is called before
the DWARF section directives are emitted, so that all the PPC text section
directives come out right at the beginning of the file.
llvm-svn: 83176
2009-09-30 22:06:26 +00:00
Bob Wilson
44b5a5a58c
Fix a comment.
...
llvm-svn: 83171
2009-09-30 21:26:13 +00:00
Mike Stump
a3bce35a07
Add a way for a frontend to generate more complex dwarf location
...
information. This allows arbitrary code involving DW_OP_plus_uconst
and DW_OP_deref. The scheme allows for easy extention to include,
any, or all of the DW_OP_ opcodes. I thought about just exposing all
of them, but, wasn't sure if people wanted the dwarf opcodes exposed
in the api. Is that a layering violation?
With this scheme, the entire existing block scheme used by llvm-gcc
can be switched over to the new scheme. I think that would be
cleaner, as then the compiler specific bits are not present in llvm
proper. Before the old code can be yanked however, similar code in
clang would have to be removed.
Next up, more testing.
llvm-svn: 83120
2009-09-30 00:08:22 +00:00
Devang Patel
e5be8e79df
Remove std::string uses from DebugInfo interface.
...
llvm-svn: 83083
2009-09-29 18:40:58 +00:00
Mike Stump
d7a3b26009
Delete space after function name, before (, reflow a comment and
...
delete a few blank lines.
llvm-svn: 82729
2009-09-24 23:21:26 +00:00
Mike Stump
26e902d371
Fix spacing.
...
llvm-svn: 82727
2009-09-24 23:11:08 +00:00