Fixed version of 122160 (the previous one would fold undefined symbols).
[oota-llvm.git] / lib / MC / MachObjectWriter.cpp
index 42cf43fea34ea0ee82a06afdabb52a636d7d220e..11681ca90b162775d263e7d8529a4e3451c3d086 100644 (file)
@@ -1123,15 +1123,13 @@ public:
                        UndefinedSymbolData);
   }
 
-  bool isAbsolute(bool IsSet, const MCSymbol &A,
-                                     const MCSymbol &B) const  {
-    // On MachO A - B is absolute only if in a set.
-    return IsSet;
-  }
-
   bool IsSymbolRefDifferenceFullyResolved(const MCAssembler &Asm,
                                           const MCSymbolRefExpr *A,
-                                          const MCSymbolRefExpr *B) const {
+                                          const MCSymbolRefExpr *B,
+                                          bool InSet) const {
+    if (InSet)
+      return true;
+
     if (!TargetObjectWriter->useAggressiveSymbolFolding())
       return false;