Add assembler fatal error for undefined assembler labels in COFF writer
[oota-llvm.git] / lib / MC / WinCOFFObjectWriter.cpp
index 6c696738b48bf873889038cc1d9523d17f681e87..f251942161d81bc2801fc72d0433c655044e62cb 100644 (file)
@@ -710,6 +710,11 @@ void WinCOFFObjectWriter::recordRelocation(
     Asm.getContext().reportFatalError(Fixup.getLoc(),
                                       Twine("symbol '") + A.getName() +
                                           "' can not be undefined");
+  if (A.isTemporary() && A.isUndefined()) {
+    Asm.getContext().reportFatalError(Fixup.getLoc(),
+                                      Twine("assembler label '") + A.getName() +
+                                          "' can not be undefined");
+  }
 
   MCSection *Section = Fragment->getParent();