Changes in directory llvm/lib/VMCore:
IntrinsicInst.cpp updated: 1.9 -> 1.10 --- Log message: getFilename/getDirectory shouldn't abort if the global has no init. This can happen on bugpoint reduced testcases f.e.. --- Diffs of the changes: (+2 -2) IntrinsicInst.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/VMCore/IntrinsicInst.cpp diff -u llvm/lib/VMCore/IntrinsicInst.cpp:1.9 llvm/lib/VMCore/IntrinsicInst.cpp:1.10 --- llvm/lib/VMCore/IntrinsicInst.cpp:1.9 Tue Jul 11 10:58:09 2006 +++ llvm/lib/VMCore/IntrinsicInst.cpp Wed Oct 4 18:06:26 2006 @@ -26,11 +26,9 @@ //===----------------------------------------------------------------------===// #include "llvm/IntrinsicInst.h" - #include "llvm/Constants.h" #include "llvm/GlobalVariable.h" #include "llvm/CodeGen/MachineDebugInfo.h" - using namespace llvm; //===----------------------------------------------------------------------===// @@ -63,6 +61,7 @@ // Once the operand indices are verified, update this assert assert(LLVMDebugVersion == (5 << 16) && "Verify operand indices"); GlobalVariable *GV = cast<GlobalVariable>(getContext()); + if (!GV->hasInitializer()) return ""; ConstantStruct *CS = cast<ConstantStruct>(GV->getInitializer()); return CS->getOperand(3)->getStringValue(); } @@ -71,6 +70,7 @@ // Once the operand indices are verified, update this assert assert(LLVMDebugVersion == (5 << 16) && "Verify operand indices"); GlobalVariable *GV = cast<GlobalVariable>(getContext()); + if (!GV->hasInitializer()) return ""; ConstantStruct *CS = cast<ConstantStruct>(GV->getInitializer()); return CS->getOperand(4)->getStringValue(); } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits