[llvm] r260258 - [MC] Adding GOTREL expression variant.

Colin LeMahieu via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 11:17:35 PST 2016


Author: colinl
Date: Tue Feb  9 13:17:34 2016
New Revision: 260258

URL: http://llvm.org/viewvc/llvm-project?rev=260258&view=rev
Log:
[MC] Adding GOTREL expression variant.

Modified:
    llvm/trunk/include/llvm/MC/MCExpr.h
    llvm/trunk/lib/MC/MCExpr.cpp

Modified: llvm/trunk/include/llvm/MC/MCExpr.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCExpr.h?rev=260258&r1=260257&r2=260258&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCExpr.h (original)
+++ llvm/trunk/include/llvm/MC/MCExpr.h Tue Feb  9 13:17:34 2016
@@ -165,6 +165,7 @@ public:
 
     VK_GOT,
     VK_GOTOFF,
+    VK_GOTREL,
     VK_GOTPCREL,
     VK_GOTTPOFF,
     VK_INDNTPOFF,

Modified: llvm/trunk/lib/MC/MCExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCExpr.cpp?rev=260258&r1=260257&r2=260258&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCExpr.cpp (original)
+++ llvm/trunk/lib/MC/MCExpr.cpp Tue Feb  9 13:17:34 2016
@@ -180,6 +180,7 @@ StringRef MCSymbolRefExpr::getVariantKin
 
   case VK_GOT: return "GOT";
   case VK_GOTOFF: return "GOTOFF";
+  case VK_GOTREL: return "GOTREL";
   case VK_GOTPCREL: return "GOTPCREL";
   case VK_GOTTPOFF: return "GOTTPOFF";
   case VK_INDNTPOFF: return "INDNTPOFF";
@@ -312,6 +313,7 @@ MCSymbolRefExpr::getVariantKindForName(S
   return StringSwitch<VariantKind>(Name.lower())
     .Case("got", VK_GOT)
     .Case("gotoff", VK_GOTOFF)
+    .Case("gotrel", VK_GOTREL)
     .Case("gotpcrel", VK_GOTPCREL)
     .Case("gottpoff", VK_GOTTPOFF)
     .Case("indntpoff", VK_INDNTPOFF)




More information about the llvm-commits mailing list