diff options
author | Torok Edwin <edwintorok@gmail.com> | 2009-09-02 11:13:56 +0000 |
---|---|---|
committer | Torok Edwin <edwintorok@gmail.com> | 2009-09-02 11:13:56 +0000 |
commit | 18e03dd70ca6a0c79c19ad49134440caf4ca7c69 (patch) | |
tree | 28c211d29a5200ef5652f2add91344c5c48c9ffd /llvm/lib/VMCore/IntrinsicInst.cpp | |
parent | 68c5f477fa30a6b2fa7687536dd3795cf85d0de4 (diff) | |
download | bcm5719-llvm-18e03dd70ca6a0c79c19ad49134440caf4ca7c69.tar.gz bcm5719-llvm-18e03dd70ca6a0c79c19ad49134440caf4ca7c69.zip |
Fix DbgStopPointInst->getFileName/getDirectory, broken by the MDNodification in
r80406, and readd a -print-dbginfo test.
llvm-svn: 80778
Diffstat (limited to 'llvm/lib/VMCore/IntrinsicInst.cpp')
-rw-r--r-- | llvm/lib/VMCore/IntrinsicInst.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/lib/VMCore/IntrinsicInst.cpp b/llvm/lib/VMCore/IntrinsicInst.cpp index 8bdc96896c5..5f33d0eebb9 100644 --- a/llvm/lib/VMCore/IntrinsicInst.cpp +++ b/llvm/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); } |