aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2009-01-15 18:40:57 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2009-01-15 18:40:57 +0000
commit6ad2b2a3d20c667e01535fed4bc7f4753aa6fc85 (patch)
tree005d34ca2d3b0f89a691a1ad73fda51ed02381a8
parentc478e52bf4c12691037856ee103c66946afeab6c (diff)
downloadexternal_llvm-6ad2b2a3d20c667e01535fed4bc7f4753aa6fc85.zip
external_llvm-6ad2b2a3d20c667e01535fed4bc7f4753aa6fc85.tar.gz
external_llvm-6ad2b2a3d20c667e01535fed4bc7f4753aa6fc85.tar.bz2
add comment to explain my previous commit, as asked by Chris
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62272 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/AsmWriter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index 8139e82..bdc50b6 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -1671,6 +1671,8 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
} else {
for (unsigned i = 1, E = I.getNumOperands(); i != E; ++i) {
Operand = I.getOperand(i);
+ // note that Operand shouldn't be null, but the test helps make dump()
+ // more tolerant of malformed IR
if (Operand && Operand->getType() != TheType) {
PrintAllTypes = true; // We have differing types! Print them all!
break;