History log of /external/llvm/lib/MC/MCSymbol.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
732cf2d598b4c9ca47e9c32fbd2e7732d971bda6 14-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't mangle \n and "

There is nothing special about quotes and newlines from the object
file point of view, only the assembler has to worry about expanding
the \n and \".

This patch then removes the special handling from the Mangler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCSymbol.cpp
ab887bf52c99c2c9a4346b6dea2b8118e18a4282 18-Oct-2013 Hans Wennborg <hans@hanshq.net> Revert "Re-commit r192758 - MC: quote tricky symbol names in asm output"

This caused the clang-native-mingw32-win7 buildbot to break.

The assembler was complaining about the following lines that were showing up
in the asm for CrashRecoveryContext.cpp:

movl $"__ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4", 4(%eax)
calll "_AddVectoredExceptionHandler@8"
.def "__ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4";
"__ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4":
calll "_RemoveVectoredExceptionHandler@4"

Reverting for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCSymbol.cpp
b74b88edac9ab490ba428aef0bdebc957399bbd7 17-Oct-2013 Hans Wennborg <hans@hanshq.net> Re-commit r192758 - MC: quote tricky symbol names in asm output

The reason this got reverted was that the @feat.00 symbol which was emitted
for every TU became quoted, and on cygwin/mingw we use the gas assembler which
couldn't handle the quotes.

This commit fixes the problem by only emitting @feat.00 for win32, where we use
clang -cc1as to assemble. gas would just drop this symbol anyway, so there is no
loss there.

With @feat.00 gone, there shouldn't be quoted symbols showing up on cygwin since
it uses the Itanium ABI, which doesn't put these funny characters in symbols.

> Because of win32 mangling, we produce symbol and section names with
> funny characters in them, most notably @ characters.
>
> MC would choke on trying to parse its own assembly output. This patch addresses
> that by:
>
> - Making @ trigger quoting of symbol names
> - Also quote section names in the same way
> - Just parse section names like other identifiers (to allow for quotes)
> - Don't assume @ signifies a symbol variant if it is in a string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192859 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCSymbol.cpp
32c24da3730e8e5ea7df3ce7aeffa257b2e7f02f 16-Oct-2013 NAKAMURA Takumi <geek4civic@gmail.com> Revert r192758 (and r192759), "MC: Better handling of tricky symbol and section names"

GNU AS didn't like quotes in symbol names.

Error: junk at end of line, first unrecognized character is `"'

.def "@feat.00";
"@feat.00" = 1

Reproduced on Cygwin's 2.23.52.20130309 and mingw32's 2.20.1.20100303.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192775 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCSymbol.cpp
508d7b7330968c48e69f0da82c66bdcc0afe6190 16-Oct-2013 Hans Wennborg <hans@hanshq.net> MC: Better handling of tricky symbol and section names

Because of win32 mangling, we produce symbol and section names with
funny characters in them, most notably @ characters.

MC would choke on trying to parse its own assembly output. This patch addresses
that by:

- Making @ trigger quoting of symbol names
- Also quote section names in the same way
- Just parse section names like other identifiers (to allow for quotes)
- Don't assume @ signifies a symbol variant if it is in a string.

Differential Revision: http://llvm-reviews.chandlerc.com/D1945

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192758 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCSymbol.cpp
c5252da873d547a19069eaf9030fec203f128f66 14-Sep-2012 Dmitri Gribenko <gribozavr@gmail.com> Fix Doxygen issues:
* wrap code blocks in \code ... \endcode;
* refer to parameter names in paragraphs correctly (\arg is not what most
people want -- it starts a new paragraph);
* use \param instead of \arg to document parameters in order to be consistent
with the rest of the codebase.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCSymbol.cpp
286c4dc355b8be6806081b23c3097485821c7642 12-Sep-2012 Manman Ren <mren@apple.com> Release build: guard dump functions with
"#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)"

No functional change. Update r163344.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCSymbol.cpp
cc77eece74c8db09acc2af425e7e6c88a5bb30d1 06-Sep-2012 Manman Ren <mren@apple.com> Release build: guard dump functions with "ifndef NDEBUG"

No functional change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCSymbol.cpp
2684d9e3c702b2ef9fd430155d94671d12fa994f 11-May-2012 Jim Grosbach <grosbach@apple.com> Tidy up. Trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCSymbol.cpp
48c9533181ec7ef24e49a4f5bca9151dc6886bad 20-Mar-2012 Jim Grosbach <grosbach@apple.com> Assembler should accept redefinitions of unused variable symbols.

rdar://11027851

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCSymbol.cpp
93a1a0dbda3e5e449a6b498f753130d0c240cacd 20-Mar-2012 Jim Grosbach <grosbach@apple.com> Tidy up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153136 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCSymbol.cpp
90604ab725da8a2a57cf3ca1541b14b95d619040 29-Apr-2011 Daniel Dunbar <daniel@zuster.org> MC: Change variable symbols to be recognized as defined, by assigning their sections based on FindAssociatedSection().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCSymbol.cpp
94ed5fca3f5ab5acb74e70b8393b837131e7110c 15-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Change MCExpr::EvaluateAsRelocatableImpl of variables to return the original
variable if recursing fails to simplify it.

Factor AliasedSymbol to be a method of MCSymbol.

Update MCAssembler::EvaluateFixup to match the change in
EvaluateAsRelocatableImpl.

Remove the WeakRefExpr hack, as the object writer now sees the weakref with
no extra effort needed.

Nothing else is using MCTargetExpr, but keep it for now.

Now that the ELF writer sees relocations with aliases, handle

.weak foo2
foo2:
.weak bar2
.set bar2,foo2
.quad bar2

the same way gas does and produce a relocation with bar2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119152 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCSymbol.cpp
db9835d0895337eb94c19e3a30b7d3fc8fcddfd5 15-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix PR8565.

This moves most of the isUsed logic to the MCSymbol itself. With this we
get a bit more relaxed about allowing definitions after uses: uses that
don't evaluate their argument immediately (jmp foo) are accepted.

ddunbar, this was the smallest compromise I could think of that lets us
accept gcc (and clang!) assembly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119144 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCSymbol.cpp
2d7fd61e94e2db0586ad9d5d26c1e7c5510a006d 05-May-2010 Daniel Dunbar <daniel@zuster.org> 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
/external/llvm/lib/MC/MCSymbol.cpp
8d627d31531ad45fecca82d52cd34092c7c4cc1d 05-May-2010 Daniel Dunbar <daniel@zuster.org> 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
/external/llvm/lib/MC/MCSymbol.cpp
10b318bcb39218d2ed525e4862c854bc8d1baf63 17-Jan-2010 Chris Lattner <sabre@nondot.org> 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
/external/llvm/lib/MC/MCSymbol.cpp
6edec7b34a7f16e0af7fa5947b69805238d6fe6c 17-Jan-2010 Chris Lattner <sabre@nondot.org> 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
/external/llvm/lib/MC/MCSymbol.cpp
acd03ae6791fc0fb9f1b05247a1dc082b46b8d8b 17-Jan-2010 Chris Lattner <sabre@nondot.org> 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
/external/llvm/lib/MC/MCSymbol.cpp
4564ec9ca7a01cea24b6491ffd90268bf2aa509c 13-Jan-2010 Chris Lattner <sabre@nondot.org> 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
/external/llvm/lib/MC/MCSymbol.cpp
f24dd5c560fe9d162045528624d105d31327ffdd 05-Jan-2010 David Greene <greened@obbligato.org> Change errs() to dbgs().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCSymbol.cpp
2928c83b010f7cfdb0f819199d806f6942a7d995 06-Nov-2009 Daniel Dunbar <daniel@zuster.org> Pass StringRef by value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCSymbol.cpp
c6f729ed5519cdf398ca4039dbdbea4f81433ec0 18-Sep-2009 Anton Korobeynikov <asl@math.spbu.ru> 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
/external/llvm/lib/MC/MCSymbol.cpp
4afcedfad11555e2c755a31eb04c0e5bdbb2a4a1 13-Sep-2009 Chris Lattner <sabre@nondot.org> 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
/external/llvm/lib/MC/MCSymbol.cpp
e19f9783231d7881efbcf2876c11f7914cf516f1 13-Sep-2009 Chris Lattner <sabre@nondot.org> 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
/external/llvm/lib/MC/MCSymbol.cpp
a8bb2490aedaad123321e28d5e0a5f32c087789b 09-Sep-2009 Chris Lattner <sabre@nondot.org> 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
/external/llvm/lib/MC/MCSymbol.cpp
aadb35f809144596d0bc5a0ae27f212f790057df 03-Sep-2009 Chris Lattner <sabre@nondot.org> 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
/external/llvm/lib/MC/MCSymbol.cpp
684c593d05db0bd277268fc9d8c05bce138c745a 03-Sep-2009 Chris Lattner <sabre@nondot.org> 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
/external/llvm/lib/MC/MCSymbol.cpp
8906ff1b9dfde28f1ff00706643ca10843b26e01 22-Aug-2009 Daniel Dunbar <daniel@zuster.org> 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
/external/llvm/lib/MC/MCSymbol.cpp
1689e0cf55205042b830fdbe3fc5f7b483997334 14-Aug-2009 Daniel Dunbar <daniel@zuster.org> Add MCSymbol::{print, dump}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/MC/MCSymbol.cpp