Commit Graph

264 Commits

Author SHA1 Message Date
Chris Lattner
1cda87c3a0 Change the internal interface to makeNameProper to take a bool that
indicates whether the label is private or not, instead of taking
prefix stuff.  One effect of this is that symbols will be generated
with *just* the private prefix, instead of both the private prefix
*and* the user-label-prefix, but this doesn't matter as long as it
is consistent.  For example we'll now get "Lfoo" instead of "L_foo".
These are just assembler temporary labels anyway, so they never even
make it into the .o file.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75607 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 04:50:12 +00:00
Devang Patel
1a8d2d2d4f Do not use Mangler to remove '1' from linkage name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75574 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 00:55:28 +00:00
Devang Patel
d84b41615e Use assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75540 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:46:19 +00:00
Devang Patel
87370b8301 Use AsmPrinter's Mangler to remove leading '1' from linkage names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75515 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:48:26 +00:00
Devang Patel
43da8fbe52 revert rev. 75503 for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75507 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:26:33 +00:00
Devang Patel
7597a6252b Use Mangler to remove leading '1' from linkage names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75503 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:19:56 +00:00
David Greene
014700c1a8 Add infrastructure to allow post instruction printing action triggers.
We'll eventually use this to print comments in asm files and do other
fun things.

This adds interfaces to the AsmPrinter and changes TableGen to invoke
the postInstructionAction when appropriate.  It also add parameters to
TargetAsmInfo to control comment layout.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75490 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 20:25:48 +00:00
Torok Edwin
c25e7581b9 assert(0) -> LLVM_UNREACHABLE.
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75379 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-11 20:10:48 +00:00
Torok Edwin
7d696d8040 Convert more assert(0)+abort() -> LLVM_UNREACHABLE,
and abort()/exit() -> llvm_report_error().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75363 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-11 13:10:19 +00:00
Devang Patel
261cc194d7 Accidently dropped this while removing dead code in previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74953 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 21:55:14 +00:00
Devang Patel
0a4afb6caf Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74949 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 21:12:32 +00:00
Daniel Dunbar
5bcc8bd0c6 Remove unused AsmPrinter OptLevel argument, and propogate.
- This more or less amounts to a revert of r65379. I'm curious to know what
   happened that caused this variable to become unused.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74579 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 01:48:54 +00:00
Devang Patel
93a65b2fe1 Struct types are described using field types only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74477 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 23:46:50 +00:00
Devang Patel
1dbc771a83 s/MainCU/ModuleCU/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74452 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 20:45:18 +00:00
Devang Patel
70f4426750 Multiple DW_TAG_compile_unit is not used, afaict, on any target.
Update dwarf writer to only emit one DW_TAG_compile_unit per .o file. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74449 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 20:38:13 +00:00
Devang Patel
13e16b65dd Remove debug info anchors - llvm.dbg.compile_units, llvm.dbg.subprograms
and llvm.dbg.global_variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74251 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-26 01:49:18 +00:00
Devang Patel
208622db8a Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74215 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 22:36:02 +00:00
Owen Anderson
a8dbf36f3f Privatize some more debug-related static data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74179 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 16:55:32 +00:00
Owen Anderson
d5509f2e02 Down with _even more_ statics!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74137 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 23:13:56 +00:00
Owen Anderson
04c05f7630 Down with statics!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74134 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 22:53:20 +00:00
Owen Anderson
bd58edf591 Move local statics to per-instance variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74132 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 22:28:12 +00:00
Chris Lattner
0de1fc4f41 sink management of DwarfWriter & MachineModuleInfo into the AsmPrinter base class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74101 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 19:09:55 +00:00
Chris Lattner
1f522feabf sink dwarf finalization out of each target into AsmPrinter::doFinalization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74097 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 18:54:37 +00:00
Chris Lattner
0a7befa8bd eliminate the ExtWeakSymbols set from AsmPrinter. This eliminates
a bunch of code from all the targets, and eliminates nondeterministic
ordering of directives being emitted in the output.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74096 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 18:52:01 +00:00
Chris Lattner
929a49356e remove dead makefile flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74065 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 05:29:56 +00:00
Devang Patel
14a55d952c Move up dwarf writer initialization in common AsmPrinter class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73784 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-19 21:54:26 +00:00
Chris Lattner
a93ca92379 move mangler quote handling from asm printers to TargetAsmInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73738 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-18 23:41:35 +00:00
Chris Lattner
b839c3f577 simplify macro debug info directive handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73736 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-18 23:31:37 +00:00
Evan Cheng
b13bafe5c1 On Darwin, ams printer should output a second label before a jump table so the linker knows it's a new atom. But this is only needed if the jump table is put in a separate section from the function body.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73720 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-18 20:37:15 +00:00
Bill Wendling
05b5e03ec8 Fix typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73464 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-16 04:02:03 +00:00
Devang Patel
c2230821a6 Use MainCU if it is available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73457 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-16 02:09:30 +00:00
Devang Patel
11a407f43f Gracefully handle imbalanced inline function begin and end markers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73426 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-15 21:45:50 +00:00
Dan Gohman
a119de86a0 Fix old-style type names in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73362 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-14 23:30:43 +00:00
Devang Patel
daf9e02893 llvm.dbg.region.end() intrinsic is not required to be in _last_ basic block in a function. If that happens then any basic block that follows (lexically) the block with regin.end will not have scope info available. LexicalScopeStack relies on processing basic block in CFG order, but this processing order is not guaranteed. Things get complicated when the optimizer gets a chance to optimizer IR with dbg intrinsics.
Apply defensive patch to preserve at least one lexical scope till the end of function.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73282 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-13 02:16:18 +00:00
Devang Patel
9217f793bf Clear AbstractInstanceRootMap at the end of the function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73244 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-12 19:24:05 +00:00
Dan Gohman
c965ee223c Remove some unnecessary #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72948 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-05 16:32:58 +00:00
Bill Wendling
8fff19ba55 Accidental commit. This isn't ready for prime time just yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72699 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-01 20:18:46 +00:00
Bill Wendling
51b16f4737 Untabification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72604 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-30 01:09:53 +00:00
Bill Wendling
df7d5d3170 Temporarily revert r72191. It was causing an assert during llvm-gcc
bootstrapping.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72200 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-21 00:04:55 +00:00
Bill Wendling
39dd696282 Minor code cleanup. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72198 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-20 23:31:45 +00:00
Bill Wendling
1795616930 Merge 'ConstructFunctionDbgScope' and 'ConstructAbstractDbgScope'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72197 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-20 23:28:48 +00:00
Bill Wendling
995f80ad5f Rename 'New*' methods to 'Create*' to be consistent. 'NewString' isn't used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72196 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-20 23:24:48 +00:00
Bill Wendling
829e67b5ec Add comment for emit section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72195 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-20 23:22:40 +00:00
Bill Wendling
94d04b8f80 Move 'Emit' methods down to their own place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72194 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-20 23:21:38 +00:00
Bill Wendling
f0fb987903 Revert r72192. It was causing a build failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72193 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-20 23:19:06 +00:00
Bill Wendling
63ad10c004 Do some mechanical changes. Combine the 'construct abastract dbg thingy' in with
the 'constract function dbg thingy'. Rename some methods to make them consistent
with the rest of the methods. Move the 'Emit' methods to the end of the file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72192 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-20 23:04:56 +00:00
Argyrios Kyrtzidis
a3437647dc Introduce DebugScope which gets embedded into the machine instructions' DebugLoc.
DebugScope refers to a debug region, function or block.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72191 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-20 22:57:17 +00:00
Mike Stump
1d4c738603 Fix cmake builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72078 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-19 00:18:14 +00:00
Bill Wendling
1180c7899c Don't set the "location" information for inlined functions' variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72064 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-18 23:08:55 +00:00
Bill Wendling
cde5d63d90 Small code cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72057 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-18 22:33:01 +00:00