Devang Patel
cc11371b77
Do not bother to emit debug info for nameless global variable.
...
llvm-svn: 86259
2009-11-06 17:58:12 +00:00
Devang Patel
06ce6506d2
Do not try to emit debug info entry for dead global variable.
...
llvm-svn: 86212
2009-11-06 01:30:04 +00:00
Devang Patel
f05d57283e
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
67f56f08c2
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
5d3fe2fc77
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
Devang Patel
ffa7c07352
Ignore unnamed variables.
...
llvm-svn: 85909
2009-11-03 18:30:27 +00:00
Jeffrey Yasskin
6235b19d7b
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
Devang Patel
cfeaa48642
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
Devang Patel
12524fd2e5
Do not emit name entry for a pointer type.
...
llvm-svn: 84276
2009-10-16 21:27:43 +00:00
Devang Patel
d0099a94db
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
6875c5ebe4
Add support to record DbgScope as inlined scope.
...
llvm-svn: 84134
2009-10-14 21:08:09 +00:00
Devang Patel
d7ebfe3963
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
cdf01b5d82
Fix a -Asserts warning.
...
llvm-svn: 83950
2009-10-13 06:47:08 +00:00
Devang Patel
0f58bec599
Find enclosing subprogram info.
...
llvm-svn: 83922
2009-10-12 23:11:24 +00:00
Devang Patel
df45c7f642
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
fafa1fe2ad
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
20b2a77765
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
4598eb6214
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
Devang Patel
7d838bb66e
Fix cut-n-pasto.
...
llvm-svn: 83367
2009-10-06 03:15:38 +00:00
Devang Patel
2980a22028
Remove dead code.
...
llvm-svn: 83362
2009-10-06 02:01:32 +00:00
Devang Patel
8db360da7b
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
475d32a987
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
d859d86538
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
1c9eef72b4
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
4c420eca41
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
4144a82154
Set address while constructing DIE.
...
llvm-svn: 83343
2009-10-05 23:22:08 +00:00
Devang Patel
2089d16140
Gracefully handle various scopes while recording source line info.
...
llvm-svn: 83317
2009-10-05 18:03:19 +00:00
Devang Patel
75cc16c0f2
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
787f94c28d
Record first and last instruction of a scope in DbgScope.
...
llvm-svn: 83207
2009-10-01 18:25:23 +00:00
Devang Patel
3256c751f5
Use MDNode * directly as an RecordSourceLine() argument.
...
llvm-svn: 83182
2009-09-30 22:51:28 +00:00
Mike Stump
14cf8ecf0b
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
b296942f6d
Remove std::string uses from DebugInfo interface.
...
llvm-svn: 83083
2009-09-29 18:40:58 +00:00
Mike Stump
944fa25934
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
d6f9a2f90b
Fix spacing.
...
llvm-svn: 82727
2009-09-24 23:11:08 +00:00
Mike Stump
8808063181
This is overly constraining with respect to clang.
...
llvm-svn: 82591
2009-09-23 00:13:30 +00:00
Daniel Dunbar
be22ec4cfc
Fix indentation.
...
llvm-svn: 82333
2009-09-19 20:40:14 +00:00
Daniel Dunbar
c418d6b106
Strip trailing whitespace.
...
llvm-svn: 82332
2009-09-19 20:40:05 +00:00
Chris Lattner
dd5a989034
eliminate the horrid AsmPrinter::getGlobalLinkName method, inlining
...
it into all of its call sites and simplifying them.
llvm-svn: 81962
2009-09-16 00:08:41 +00:00
Caroline Tice
183a519771
Don't generate Dwarf line table entries for source line 0.
...
llvm-svn: 81542
2009-09-11 18:25:54 +00:00
Chris Lattner
321bc99a74
remove DebugLoc from MCInst and eliminate "Comment printing" from
...
the MCInst path of the asmprinter. Instead, pull comment printing
out of the autogenerated asmprinter into each target that uses the
autogenerated asmprinter. This causes code duplication into each
target, but in a way that will be easier to clean up later when more
asmprinter stuff is commonized into the base AsmPrinter class.
This also fixes an xcore strangeness where it inserted two tabs
before every instruction.
llvm-svn: 81396
2009-09-09 23:14:36 +00:00
Devang Patel
f5d5360065
Ignore malformed global variable debug info.
...
llvm-svn: 81055
2009-09-04 23:59:07 +00:00
Devang Patel
b2de5fa689
Subprogram is a scope. Derive DISubprogram from DIScope.
...
llvm-svn: 80637
2009-08-31 22:47:13 +00:00
Devang Patel
869529c58c
Rename DIBlock as DILexicalBlock.
...
llvm-svn: 80633
2009-08-31 22:00:15 +00:00
Caroline Tice
c87c1e2cfd
Add flag to mark structs for Apple Block "byref" variables; also add code to
...
modify the type and location debug information for these variables to match the
programmer's expectations.
llvm-svn: 80625
2009-08-31 21:19:37 +00:00
Devang Patel
9fda4bd998
Simplify isDerivedType() and other predicate interface.
...
llvm-svn: 80602
2009-08-31 18:49:10 +00:00
Devang Patel
80ae34974b
Reapply 79977.
...
Use MDNodes to encode debug info in llvm IR.
llvm-svn: 80406
2009-08-28 23:24:31 +00:00
Devang Patel
3082c01d68
Closure is a very generic name. Use AppleBlock instead.
...
llvm-svn: 80307
2009-08-27 23:51:51 +00:00
Devang Patel
f08e35d9dc
Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.
...
llvm-svn: 80073
2009-08-26 05:01:18 +00:00
Devang Patel
a1b4dd96f2
Add isClosure() predicate. This is used to add DW_AT_APPLE_block attribute.
...
Patch by Caroline Tice.
llvm-svn: 80061
2009-08-26 00:39:50 +00:00
Devang Patel
02aac922b4
Update DebugInfo interface to use metadata, instead of special named llvm.dbg.... global variables, to encode debugging information in llvm IR. This is mostly a mechanical change that tests metadata support very well.
...
This change speeds up llvm-gcc by more then 6% at "-O0 -g" (measured by compiling InstructionCombining.cpp!)
llvm-svn: 79977
2009-08-25 05:24:07 +00:00