llvm-6502/lib
David Peixotto 0fc8c68b11 Add support for parsing ARM symbol variants on ELF targets
ARM symbol variants are written with parens instead of @ like this:

  .word __GLOBAL_I_a(target1)

This commit adds support for parsing these symbol variants in
expressions. We introduce a new flag to MCAsmInfo that indicates the
parser should use parens to parse the symbol variant. The expression
parser is modified to look for symbol variants using parens instead
of @ when the corresponding MCAsmInfo flag is true.

The MCAsmInfo parens flag is enabled only for ARM on ELF.

By adding this flag to MCAsmInfo, we are able to get rid of
redundant ARM-specific symbol variants and use the generic variants
instead (e.g. VK_GOT instead of VK_ARM_GOT). We use the new
UseParensForSymbolVariant attribute in MCAsmInfo to correctly print
the symbol variants for arm.

To achive this we need to keep a handle to the MCAsmInfo in the
MCSymbolRefExpr class that we can check when printing the symbol
variant.

Updated Tests:
  Changed case of symbol variant to match the generic kind.
  test/CodeGen/ARM/tls-models.ll
  test/CodeGen/ARM/tls1.ll
  test/CodeGen/ARM/tls2.ll
  test/CodeGen/Thumb2/tls1.ll
  test/CodeGen/Thumb2/tls2.ll

PR18080


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196424 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-04 22:43:20 +00:00
..
Analysis [PM] Split the CallGraph out from the ModulePass which creates the 2013-11-26 04:19:30 +00:00
AsmParser Debug Info: drop debug info via upgrading path if version number does not match. 2013-12-02 21:29:56 +00:00
Bitcode Debug Info: drop debug info via upgrading path if version number does not match. 2013-12-02 21:29:56 +00:00
CodeGen Simplify check. 2013-12-04 22:29:02 +00:00
DebugInfo DebugInfo: Avoid emitting pubtype entries for type DIEs that just indirect to a type unit. 2013-11-26 00:22:37 +00:00
ExecutionEngine Use the mangler consistently instead of using getGlobalPrefix directly. 2013-11-28 08:59:52 +00:00
IR Un-revert r196358: "llvm-cov: Added support for function checksums." 2013-12-04 08:57:17 +00:00
IRReader [llvm-c] Expose IRReader interface 2013-11-06 09:21:15 +00:00
Linker Revert "Move copying of global initializers below the cloning of functions." 2013-11-09 00:43:18 +00:00
LTO Use array_pod_sort instead of std::sort 2013-11-16 16:15:56 +00:00
MC Add support for parsing ARM symbol variants on ELF targets 2013-12-04 22:43:20 +00:00
Object Path: Recognize COFF import library file magic. 2013-11-15 21:22:02 +00:00
Option Avoid buffer copies when a Twine already is a StringRef. 2013-12-03 18:18:28 +00:00
Support Return true on success in cl::ExpandResponseFiles 2013-12-03 19:13:18 +00:00
TableGen Fix most memory leaks in tablegen. 2013-10-31 04:07:41 +00:00
Target Add support for parsing ARM symbol variants on ELF targets 2013-12-04 22:43:20 +00:00
Transforms llvm-cov: Replace size() with empty() in bool check. 2013-12-04 19:18:23 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile Reformat Makefile. No other changes. 2013-10-30 04:03:03 +00:00