got ghost linkage. It's better than aborting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88715
91177308-0d34-0410-b5e6-
96231b3b80d8
case GlobalValue::AvailableExternallyLinkage:
Out << "available_externally ";
break;
case GlobalValue::AvailableExternallyLinkage:
Out << "available_externally ";
break;
- case GlobalValue::GhostLinkage:
- llvm_unreachable("GhostLinkage not allowed in AsmWriter!");
+ // This is invalid syntax and just a debugging aid.
+ case GlobalValue::GhostLinkage: Out << "ghost "; break;
}
void AssemblyWriter::printGlobal(const GlobalVariable *GV) {
}
void AssemblyWriter::printGlobal(const GlobalVariable *GV) {
+ // If we're going to print a global that has GhostLinkage
+ // materialize it now.
+ if (GV->getLinkage() == GlobalValue::GhostLinkage) {
+ }
+
WriteAsOperandInternal(Out, GV, &TypePrinter, &Machine);
Out << " = ";
WriteAsOperandInternal(Out, GV, &TypePrinter, &Machine);
Out << " = ";