Bill Wendling
ddec6838a9
Add verbose EH table printing to SjLj exception tables.
...
llvm-svn: 133561
2011-06-21 22:40:24 +00:00
Bill Wendling
a8339eb0d0
Improve the comment printing for the EH table. This gives a much more detailed
...
explanation of what the EH table describes.
llvm-svn: 133559
2011-06-21 22:30:20 +00:00
Jay Foad
6002068c13
Fix a FIXME by making GlobalVariable::getInitializer() return a
...
const Constant *.
llvm-svn: 133400
2011-06-19 18:37:11 +00:00
Rafael Espindola
ab20567227
Handle jump tables. Test to follow soon.
...
llvm-svn: 133083
2011-06-15 21:00:28 +00:00
Eli Friedman
8a3264ad48
Revert r133004 ; it's breaking nightly tests.
...
llvm-svn: 133007
2011-06-14 19:30:33 +00:00
Rafael Espindola
5e85158321
Partial revert of 132882.
...
Dan noted that this would work on the case shown on the commit message. I think
the case that was failing was a bb ending with a redundant conditional jump:
...
jne foo
foo:
...
I was unable to find any such case in the tests or in a debug build of clang,
so I will revert this part of the patch and watch the bots.
llvm-svn: 133004
2011-06-14 18:12:31 +00:00
Rafael Espindola
844485af13
Implement Jakob's suggestion on how to detect fall thought without calling
...
AnalyzeBranch.
llvm-svn: 132981
2011-06-14 06:08:32 +00:00
Rafael Espindola
2f3c2fe7c5
Really fix the fall-through logic.
...
Add a triple to the tests.
llvm-svn: 132885
2011-06-12 05:57:01 +00:00
Rafael Espindola
653a07206d
Fix silly bug I introduce in the previous commit. Fixes debug builds.
...
llvm-svn: 132883
2011-06-12 05:26:32 +00:00
Rafael Espindola
defd4b0875
AnalyzeBranch doesn't change which successors a bb has, just the order
...
we try to branch to them.
Before we were creating successor lists with duplicated entries. Fixing that
found a bug in isBlockOnlyReachableByFallthrough that would causes it to
return the wrong answer for
-----------
...
jne foo
jmp bar
foo:
----------
llvm-svn: 132882
2011-06-12 03:20:32 +00:00
Chad Rosier
b90a43d266
Ensure that EmitGlobalVariable is correctly differentiating between declarations
...
and definitions when emitting global variables. This was causing global
declarations to be emitted as if they were definitions.
Fixes <rdar://problem/9429892>.
llvm-svn: 132825
2011-06-10 00:53:15 +00:00
Benjamin Kramer
440c3b7306
Use path API for path concatenation.
...
llvm-svn: 132668
2011-06-05 14:36:47 +00:00
Devang Patel
e7181b5fdb
A DBG_VALUE that truncates a range does not start another dbg value range.
...
llvm-svn: 132433
2011-06-01 23:00:17 +00:00
Devang Patel
324f843107
Do not drop constant values when a variable's content is described using .debug_loc entries.
...
llvm-svn: 132427
2011-06-01 22:03:25 +00:00
Devang Patel
562c74284f
Incomplete type may not have corresponding DIE, so do not check DIEEntry eagerly.
...
llvm-svn: 132377
2011-06-01 00:23:24 +00:00
Devang Patel
1cb8ab456c
Refactor.
...
llvm-svn: 132373
2011-05-31 23:30:30 +00:00
Devang Patel
e9853f25ad
Include global types, that are referenced through local variables, in debug_pubtypes list.
...
llvm-svn: 132371
2011-05-31 22:56:51 +00:00
Charles Davis
a575226fd8
Emit the handler's data area. For GCC-style exceptions under Win64, the
...
handler's data area starts with a 4-byte reference to the personality
function, followed by the DWARF LSDA.
llvm-svn: 132302
2011-05-30 00:13:34 +00:00
Charles Davis
b025724b46
When generating against the Win64 EH scheme, set the handler to the GCC-specific
...
handler.
At this moment, only GCC-style exceptions are supported. Other kinds
of exceptions, including "traditional" SEH and Microsoft Visual C++ exceptions,
need more work--and an compiler exception model that isn't specific to
GCC-style exceptions!
In particular, I imagine that it would be possible to mix "traditional" SEH
with GCC-style EH or Microsoft C++ EH. Currently LLVM has no way (beyond some
target-specific defaults and whole-module compiler switches) of knowing which
scheme to use when.
llvm-svn: 132283
2011-05-29 04:28:35 +00:00
Charles Davis
5638b9f01e
When generating code for Win64 EH, emit StartProc and EndProc directives.
...
llvm-svn: 132250
2011-05-28 04:21:04 +00:00
Devang Patel
8816bbc02d
Select DW_AT_const_value size based on global variable size.
...
llvm-svn: 132239
2011-05-28 00:39:18 +00:00
Rafael Espindola
836f7db2cc
Fix the root cause of the bootstrap failure:
...
There was no way to check if a given register/mode pair was valid. We now return
an error code (-2) instead of asserting. If anyone thinks that an assert
at this point is really needed, we can autogen a hasValidDwarfRegNum instead.
llvm-svn: 132236
2011-05-28 00:13:01 +00:00
Charles Davis
91ed799eb4
Stub out support for Win64-style exceptions. Note that this is merely using
...
the Win64 EH mechanism to implement GCC-style exceptions. LLVM supports
hardly anything else at this point!
llvm-svn: 132234
2011-05-27 23:47:32 +00:00
Rafael Espindola
b8e08be77d
Fix a regression I recently introduced by removing DwarfRegNum of
...
subregisters:
When a value is in a subregister, at least report the location as being
the superregister. We should extend the .td files to encode the bit
range so that we can produce a DW_OP_bit_piece.
llvm-svn: 132224
2011-05-27 22:15:01 +00:00
Rafael Espindola
d23bfb8a7a
Make size computation less brittle.
...
llvm-svn: 132222
2011-05-27 22:05:41 +00:00
Devang Patel
39e22eae49
Keep this simple. Use DIType to get signness and size of a type. Based on size, select appropraite form.
...
llvm-svn: 132206
2011-05-27 19:13:26 +00:00
Devang Patel
f1d04706fb
Handle signed types gracefully.
...
This fixes regressions reported by buildbots as a fallout of r132193.
llvm-svn: 132197
2011-05-27 18:15:52 +00:00
Devang Patel
3c6aed2d98
Select DW_AT_const_value size based on variable size.
...
llvm-svn: 132193
2011-05-27 16:45:18 +00:00
Rafael Espindola
fc9bae6f8b
Replace the -unwind-tables option with a per function flag. This is more
...
LTO friendly as we can now correctly merge files compiled with or without
-fasynchronous-unwind-tables.
llvm-svn: 132033
2011-05-25 03:44:17 +00:00
Devang Patel
354fa0798f
Fix debug info for blocks' variable.
...
llvm-svn: 131940
2011-05-24 00:22:25 +00:00
Devang Patel
faaa16ea2c
Remove unnecessary comment.
...
llvm-svn: 131936
2011-05-23 23:16:14 +00:00
Jim Grosbach
8aded86edb
No reason not to allow defining the CFA as a reg w/ offset zero.
...
llvm-svn: 131760
2011-05-20 21:50:09 +00:00
Jim Grosbach
17c1d13ee4
Fix typo.
...
llvm-svn: 131757
2011-05-20 21:35:39 +00:00
Jim Grosbach
83c4bb157a
Add support for frame info use of the .cfi_def_cfa directive.
...
llvm-svn: 131756
2011-05-20 21:23:17 +00:00
Devang Patel
12419aee7a
Doug convinced me that DW_AT_APPLE_objc_complete_type is more appropriate name.
...
s/DW_AT_APPLE_objc_class_extension/DW_AT_APPLE_objc_complete_type/g
llvm-svn: 131244
2011-05-12 21:29:42 +00:00
Devang Patel
2409e7843b
Let Objective-C front-end identify class extension, in dwarf output, using an attribute DW_AT_APPLE_objc_class_extension.
...
llvm-svn: 131238
2011-05-12 19:06:16 +00:00
Devang Patel
34a6620748
Identify end of prologue (and beginning of function body) using DW_LNS_set_prologue_end line table opcode.
...
llvm-svn: 131194
2011-05-11 19:22:19 +00:00
Rafael Espindola
a678098f24
Initialize moveTypeModule.
...
llvm-svn: 131157
2011-05-10 21:54:59 +00:00
Rafael Espindola
19c1a56287
Produce a __debug_frame section on darwin ARM when appropriate.
...
llvm-svn: 131151
2011-05-10 21:04:45 +00:00
Rafael Espindola
2fe0ee1ce2
Rename DwarfRequiresRelocationForStmtList to
...
DwarfRequiresRelocationForSectionOffset as this is not specific to StmtList.
llvm-svn: 131148
2011-05-10 20:35:05 +00:00
Rafael Espindola
fdc3e6fab6
Use .cfi_sections to put the unwind info in .debug_frame when possible. With
...
this clang will use .debug_frame in, for example,
clang -g -c -m32 test.c
This matches gcc's behaviour. It looks like .debug_frame is a bit bigger
than .eh_frame, but has the big advantage of not being allocated.
llvm-svn: 131140
2011-05-10 18:39:09 +00:00
Devang Patel
589845d887
Do not ignore InlinedAt while walking up scope chain to find subprogram node.
...
llvm-svn: 131106
2011-05-09 22:14:49 +00:00
Devang Patel
17b532728b
Move CompileUnit::getOrCreateNameSpace() and CompileUnit::addPubType() from DwarfDebug.cpp to DwarfCompileUnit.cpp
...
llvm-svn: 130991
2011-05-06 16:57:54 +00:00
Rafael Espindola
705d25a1f4
Nothing else uses this label.
...
llvm-svn: 130989
2011-05-06 15:44:29 +00:00
Rafael Espindola
6e4fa20efb
Yet more dead code.
...
llvm-svn: 130988
2011-05-06 15:31:55 +00:00
Rafael Espindola
d06c2c1b81
Update comments.
...
llvm-svn: 130987
2011-05-06 15:28:56 +00:00
Rafael Espindola
4bfa978ca5
More dead code elimination.
...
llvm-svn: 130985
2011-05-06 15:22:26 +00:00
Rafael Espindola
a716096677
Dead code elimination.
...
llvm-svn: 130984
2011-05-06 14:56:22 +00:00
Rafael Espindola
bb237c72a6
Remove DwarfTableException.
...
llvm-svn: 130964
2011-05-05 23:19:54 +00:00
Rafael Espindola
ec0a3a0bbf
Remove the DwarfTable enum.
...
llvm-svn: 130959
2011-05-05 22:14:31 +00:00