diff options
| author | Eric Christopher <echristo@apple.com> | 2009-11-13 23:00:14 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@apple.com> | 2009-11-13 23:00:14 +0000 |
| commit | e9d5a80c80238bf6b3fce6507ba8a9568bc5b093 (patch) | |
| tree | c2aec01d8db0fefc786258c1a880ba7b8c0074da /lib/VMCore | |
| parent | 1c29f6d0a24c3dada6f50d47f6ccc90293a9840e (diff) | |
| download | external_llvm-e9d5a80c80238bf6b3fce6507ba8a9568bc5b093.zip external_llvm-e9d5a80c80238bf6b3fce6507ba8a9568bc5b093.tar.gz external_llvm-e9d5a80c80238bf6b3fce6507ba8a9568bc5b093.tar.bz2 | |
Print out something, even if it's non-parseable later when we've
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
Diffstat (limited to 'lib/VMCore')
| -rw-r--r-- | lib/VMCore/AsmWriter.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 9a803a1..4954522 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -1497,8 +1497,8 @@ static void PrintLinkage(GlobalValue::LinkageTypes LT, 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; } } @@ -1514,6 +1514,11 @@ static void PrintVisibility(GlobalValue::VisibilityTypes Vis, } 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 << " = "; |
