[llvm-commits] [llvm] r51910 - /llvm/trunk/lib/VMCore/AsmWriter.cpp
Dale Johannesen
dalej at apple.com
Tue Jun 3 11:14:30 PDT 2008
Author: johannes
Date: Tue Jun 3 13:14:29 2008
New Revision: 51910
URL: http://llvm.org/viewvc/llvm-project?rev=51910&view=rev
Log:
Prevent a crash in debug dumps.
Modified:
llvm/trunk/lib/VMCore/AsmWriter.cpp
Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=51910&r1=51909&r2=51910&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Tue Jun 3 13:14:29 2008
@@ -979,7 +979,11 @@
}
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;
More information about the llvm-commits
mailing list