X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FVMCore%2FIntrinsicInst.cpp;h=5c43b6f5e1d9a724343159e9edfe39f5f1f59f88;hb=b83eb6447ba155342598f0fabe1f08f5baa9164a;hp=9c2efc3881686aa6aa0529a04073a28830b83f3d;hpb=ca0dc56742986df05f9a7e0b425e2e798eaa2f92;p=oota-llvm.git diff --git a/lib/VMCore/IntrinsicInst.cpp b/lib/VMCore/IntrinsicInst.cpp index 9c2efc38816..5c43b6f5e1d 100644 --- a/lib/VMCore/IntrinsicInst.cpp +++ b/lib/VMCore/IntrinsicInst.cpp @@ -26,11 +26,9 @@ //===----------------------------------------------------------------------===// #include "llvm/IntrinsicInst.h" - #include "llvm/Constants.h" #include "llvm/GlobalVariable.h" #include "llvm/CodeGen/MachineDebugInfo.h" - using namespace llvm; //===----------------------------------------------------------------------===// @@ -61,16 +59,18 @@ Value *DbgInfoIntrinsic::StripCast(Value *C) { std::string DbgStopPointInst::getFileName() const { // Once the operand indices are verified, update this assert - assert(LLVMDebugVersion == (4 << 16) && "Verify operand indices"); + assert(LLVMDebugVersion == (5 << 16) && "Verify operand indices"); GlobalVariable *GV = cast(getContext()); + if (!GV->hasInitializer()) return ""; ConstantStruct *CS = cast(GV->getInitializer()); return CS->getOperand(3)->getStringValue(); } std::string DbgStopPointInst::getDirectory() const { // Once the operand indices are verified, update this assert - assert(LLVMDebugVersion == (4 << 16) && "Verify operand indices"); + assert(LLVMDebugVersion == (5 << 16) && "Verify operand indices"); GlobalVariable *GV = cast(getContext()); + if (!GV->hasInitializer()) return ""; ConstantStruct *CS = cast(GV->getInitializer()); return CS->getOperand(4)->getStringValue(); }