diff options
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index d8372ef..9e01005 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -979,7 +979,11 @@ void AssemblyWriter::printGlobal(const GlobalVariable *GV) { } void AssemblyWriter::printAlias(const GlobalAlias *GA) { - Out << getLLVMName(GA->getName(), GlobalPrefix) << " = "; + // Don't crash when dumping partially built GA + if (!GA->hasName()) + Out << "<<nameless>> = "; + else + Out << getLLVMName(GA->getName(), GlobalPrefix) << " = "; switch (GA->getVisibility()) { default: assert(0 && "Invalid visibility style!"); case GlobalValue::DefaultVisibility: break; |