Better fix for ARM MOVT relocation encoding of thumb bit.

Replaces r145318 with a more targetted fix for the relocation handling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145346 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp
index 802bb8e..29adbcb 100644
--- a/lib/MC/MCAssembler.cpp
+++ b/lib/MC/MCAssembler.cpp
@@ -273,17 +273,13 @@
 
   Value = Target.getConstant();
 
-  bool SetThumbBit = false;
+  bool IsThumb = false;
   if (const MCSymbolRefExpr *A = Target.getSymA()) {
     const MCSymbol &Sym = A->getSymbol().AliasedSymbol();
     if (Sym.isDefined())
       Value += Layout.getSymbolOffset(&getSymbolData(Sym));
-    // ARM data fixups based from a thumb function address need to have the low
-    // bit set. The actual value is always at least 16-bit aligned, so the
-    // low bit is normally clear and available for use as an ISA flag for
-    // interworking.
-    if (Fixup.getKind() == FK_Data_4 && isThumbFunc(&Sym))
-      SetThumbBit = true;
+    if (isThumbFunc(&Sym))
+      IsThumb = true;
   }
   if (const MCSymbolRefExpr *B = Target.getSymB()) {
     const MCSymbol &Sym = B->getSymbol().AliasedSymbol();
@@ -306,7 +302,11 @@
     Value -= Offset;
   }
 
-  if (SetThumbBit)
+  // ARM fixups based from a thumb function address need to have the low
+  // bit set. The actual value is always at least 16-bit aligned, so the
+  // low bit is normally clear and available for use as an ISA flag for
+  // interworking.
+  if (IsThumb)
     Value |= 1;
 
   return IsResolved;