[llvm-commits] [llvm] r124071 - in /llvm/trunk: lib/MC/MCExpr.cpp test/MC/ELF/relocation.s
Rafael Espindola
rafael.espindola at gmail.com
Sun Jan 23 08:11:25 PST 2011
Author: rafael
Date: Sun Jan 23 10:11:25 2011
New Revision: 124071
URL: http://llvm.org/viewvc/llvm-project?rev=124071&view=rev
Log:
Add support for lowercase variants.
Modified:
llvm/trunk/lib/MC/MCExpr.cpp
llvm/trunk/test/MC/ELF/relocation.s
Modified: llvm/trunk/lib/MC/MCExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCExpr.cpp?rev=124071&r1=124070&r2=124071&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCExpr.cpp (original)
+++ llvm/trunk/lib/MC/MCExpr.cpp Sun Jan 23 10:11:25 2011
@@ -206,19 +206,33 @@
MCSymbolRefExpr::getVariantKindForName(StringRef Name) {
return StringSwitch<VariantKind>(Name)
.Case("GOT", VK_GOT)
+ .Case("got", VK_GOT)
.Case("GOTOFF", VK_GOTOFF)
+ .Case("gotoff", VK_GOTOFF)
.Case("GOTPCREL", VK_GOTPCREL)
+ .Case("gotpcrel", VK_GOTPCREL)
.Case("GOTTPOFF", VK_GOTTPOFF)
+ .Case("gottpoff", VK_GOTTPOFF)
.Case("INDNTPOFF", VK_INDNTPOFF)
+ .Case("indntpoff", VK_INDNTPOFF)
.Case("NTPOFF", VK_NTPOFF)
+ .Case("ntpoff", VK_NTPOFF)
.Case("GOTNTPOFF", VK_GOTNTPOFF)
+ .Case("gotntpoff", VK_GOTNTPOFF)
.Case("PLT", VK_PLT)
+ .Case("plt", VK_PLT)
.Case("TLSGD", VK_TLSGD)
+ .Case("tlsgd", VK_TLSGD)
.Case("TLSLD", VK_TLSLD)
+ .Case("tlsld", VK_TLSLD)
.Case("TLSLDM", VK_TLSLDM)
+ .Case("tlsldm", VK_TLSLDM)
.Case("TPOFF", VK_TPOFF)
+ .Case("tpoff", VK_TPOFF)
.Case("DTPOFF", VK_DTPOFF)
+ .Case("dtpoff", VK_DTPOFF)
.Case("TLVP", VK_TLVP)
+ .Case("tlvp", VK_TLVP)
.Default(VK_Invalid);
}
Modified: llvm/trunk/test/MC/ELF/relocation.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/relocation.s?rev=124071&r1=124070&r2=124071&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/relocation.s (original)
+++ llvm/trunk/test/MC/ELF/relocation.s Sun Jan 23 10:11:25 2011
@@ -13,7 +13,7 @@
leaq foo at TLSGD(%rip), %rax # R_X86_64_TLSGD
leaq foo at TPOFF(%rax), %rax # R_X86_64_TPOFF32
leaq foo at TLSLD(%rip), %rdi # R_X86_64_TLSLD
- leaq foo at DTPOFF(%rax), %rcx # R_X86_64_DTPOFF32
+ leaq foo at dtpoff(%rax), %rcx # R_X86_64_DTPOFF32
pushq $bar
movq foo(%rip), %rdx
leaq foo-bar(%r14),%r14
More information about the llvm-commits
mailing list