Bring back r239006 with a fix.
[oota-llvm.git] / lib / MC / WinCOFFObjectWriter.cpp
index 2f6d18056053fd113248e6cc81205c828dd9a6b6..d1453fdaad953e814d607bf7f01b0f6fd11adfe2 100644 (file)
@@ -706,7 +706,7 @@ void WinCOFFObjectWriter::RecordRelocation(
 
   const MCSymbol &Symbol = Target.getSymA()->getSymbol();
   const MCSymbol &A = Symbol;
-  if (!Asm.hasSymbolData(A))
+  if (!A.isRegistered())
     Asm.getContext().reportFatalError(Fixup.getLoc(),
                                       Twine("symbol '") + A.getName() +
                                           "' can not be undefined");
@@ -1021,7 +1021,7 @@ void WinCOFFObjectWriter::WriteObject(MCAssembler &Asm,
 
   {
     sections::iterator i, ie;
-    MCAssembler::const_iterator j, je;
+    MCAssembler::iterator j, je;
 
     for (auto &Section : Sections) {
       if (Section->Number != -1) {