Re-commit r192758 - MC: quote tricky symbol names in asm output
[oota-llvm.git] / lib / Target / X86 / X86AsmPrinter.cpp
index 7d7a1add2219a1ce69846b52991241ae0062eb44..d7f7c3e55daa919e02eb0391d18aae7f41eccbf4 100644 (file)
@@ -519,9 +519,11 @@ void X86AsmPrinter::EmitStartOfAsmFile(Module &M) {
   if (Subtarget->isTargetEnvMacho())
     OutStreamer.SwitchSection(getObjFileLowering().getTextSection());
 
-  if (Subtarget->isTargetCOFF()) {
+  if (Subtarget->isTargetCOFF() && Subtarget->isTargetWindows()) {
     // Emit an absolute @feat.00 symbol.  This appears to be some kind of
     // compiler features bitfield read by link.exe.
+    // We only do this on win32, since on cygwin etc. we use the GNU assembler,
+    // which doesn't handle this symbol.
     if (!Subtarget->is64Bit()) {
       MCSymbol *S = MMI->getContext().GetOrCreateSymbol(StringRef("@feat.00"));
       OutStreamer.BeginCOFFSymbolDef(S);