Commit Graph

16 Commits

Author SHA1 Message Date
Daniel Dunbar
2d7fd61e94 MC/Mach-O: Mark absolute variable's appropriately, and add Mach-O support for
writing them.
 - <rdar://problem/7885351> integrated assembler broken for i386 objc code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103112 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-05 19:01:05 +00:00
Daniel Dunbar
8d627d3153 MC: Make setVariableValue check the redefinition condition a bit more strongly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103110 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-05 19:00:56 +00:00
Chris Lattner
10b318bcb3 now that MCSymbol::print doesn't use it's MAI argument, we can
remove it and change all the code that prints MCSymbols to use 
<< instead, which is much simpler and cleaner.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93695 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 21:43:43 +00:00
Chris Lattner
6edec7b34a rename NameNeedsEscaping -> NameNeedsQuoting, eliminate the check
for first character which is a digit, mangler would have taken care
of this already.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93694 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 20:11:03 +00:00
Chris Lattner
acd03ae679 Get MCSymbol out of the mangling business, and move all the logic
to Mangler.  Now MCSymbol just decides whether to slap quotes around
a symbol when printing it.

This also fixes some weirdness where two MCSymbols could be created
for the same symbol, if one needed to be mangled and got mangled to
the other one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93690 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 19:23:46 +00:00
Chris Lattner
4564ec9ca7 expose a static function as a static method on the MCSymbol class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93350 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 21:09:59 +00:00
David Greene
f24dd5c560 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92632 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:28:10 +00:00
Daniel Dunbar
2928c83b01 Pass StringRef by value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86251 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06 10:58:06 +00:00
Anton Korobeynikov
c6f729ed55 Allow symbols to start from the digit if target requests it. This allows, e.g. pinning
variables to specified absolute address. Make use of this feature for MSP430.
This unbreaks PR4776.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82227 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-18 16:57:42 +00:00
Chris Lattner
4afcedfad1 fix MCSymbol printing on darwin to exactly match the mangler (handling of \n and " in a symbol name).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81683 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 18:11:09 +00:00
Chris Lattner
e19f978323 Make the MC symbol printer and llvm::Mangler exactly agree on mangling
for systems that don't support quoting (PR4966).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81682 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 18:04:46 +00:00
Chris Lattner
a8bb2490ae allow @ in symbol names without quoting the identifier. This
allows things like @PLT without quotes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81296 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09 00:14:09 +00:00
Chris Lattner
aadb35f809 fix MCSymbol printing to exactly match the normal mangler rules so
we can diff .s files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80894 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-03 05:57:47 +00:00
Chris Lattner
684c593d05 Thread an MCAsmInfo pointer through the various MC printing APIs,
and fix a few things using << on MCSymbols to use ->print(). No
functionality change other than unbreaking my previous patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80890 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-03 05:46:51 +00:00
Daniel Dunbar
8906ff1b9d llvm-mc: Clean up some handling of symbol/section association to be more correct
(external was really undefined and there wasn't an explicit representation for
absolute symbols).
 - This still needs some cleanup to how the absolute "pseudo" section is dealt
   with, but I haven't figured out the nicest approach yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79733 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-22 07:22:36 +00:00
Daniel Dunbar
1689e0cf55 Add MCSymbol::{print, dump}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78983 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 03:41:23 +00:00