MC/Mach-O/x86_64: Temporary labels in cstring sections require symbols (and external relocations, but we don't have x86_64 relocations yet).

llvm-svn: 98583
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp
index 0d00ed1..4cf8b7e 100644
--- a/llvm/lib/MC/MCAssembler.cpp
+++ b/llvm/lib/MC/MCAssembler.cpp
@@ -674,7 +674,10 @@
       const MCSymbol &Symbol = it->getSymbol();
 
       // Ignore assembler temporaries.
-      if (it->getSymbol().isTemporary())
+      if (it->getSymbol().isTemporary() &&
+          (!it->getFragment() ||
+           !Asm.getBackend().doesSectionRequireSymbols(
+             it->getFragment()->getParent()->getSection())))
         continue;
 
       if (!it->isExternal() && !Symbol.isUndefined())
@@ -710,7 +713,10 @@
       const MCSymbol &Symbol = it->getSymbol();
 
       // Ignore assembler temporaries.
-      if (it->getSymbol().isTemporary())
+      if (it->getSymbol().isTemporary() &&
+          (!it->getFragment() ||
+           !Asm.getBackend().doesSectionRequireSymbols(
+             it->getFragment()->getParent()->getSection())))
         continue;
 
       if (it->isExternal() || Symbol.isUndefined())