projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
428ac54
)
Prevent a crash in debug dumps.
author
Dale Johannesen
<dalej@apple.com>
Tue, 3 Jun 2008 18:14:29 +0000
(18:14 +0000)
committer
Dale Johannesen
<dalej@apple.com>
Tue, 3 Jun 2008 18:14:29 +0000
(18:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51910
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/AsmWriter.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/AsmWriter.cpp
b/lib/VMCore/AsmWriter.cpp
index d8372ef0063637af48f21c3895f095c5a3f6ea43..9e010051a51102c08c06818e5e4140d11ffbcfd8 100644
(file)
--- 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;