diff options
Diffstat (limited to 'lib/VMCore/IntrinsicInst.cpp')
-rw-r--r-- | lib/VMCore/IntrinsicInst.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/VMCore/IntrinsicInst.cpp b/lib/VMCore/IntrinsicInst.cpp index 8bdc968..5f33d0e 100644 --- a/lib/VMCore/IntrinsicInst.cpp +++ b/lib/VMCore/IntrinsicInst.cpp @@ -61,17 +61,11 @@ Value *DbgInfoIntrinsic::StripCast(Value *C) { Value *DbgStopPointInst::getFileName() const { // Once the operand indices are verified, update this assert assert(LLVMDebugVersion == (7 << 16) && "Verify operand indices"); - GlobalVariable *GV = cast<GlobalVariable>(getContext()); - if (!GV->hasInitializer()) return NULL; - ConstantStruct *CS = cast<ConstantStruct>(GV->getInitializer()); - return CS->getOperand(3); + return getContext()->getElement(3); } Value *DbgStopPointInst::getDirectory() const { // Once the operand indices are verified, update this assert assert(LLVMDebugVersion == (7 << 16) && "Verify operand indices"); - GlobalVariable *GV = cast<GlobalVariable>(getContext()); - if (!GV->hasInitializer()) return NULL; - ConstantStruct *CS = cast<ConstantStruct>(GV->getInitializer()); - return CS->getOperand(4); + return getContext()->getElement(4); } |