summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/IntrinsicInst.cpp
diff options
context:
space:
mode:
authorTorok Edwin <edwintorok@gmail.com>2009-09-02 11:13:56 +0000
committerTorok Edwin <edwintorok@gmail.com>2009-09-02 11:13:56 +0000
commit18e03dd70ca6a0c79c19ad49134440caf4ca7c69 (patch)
tree28c211d29a5200ef5652f2add91344c5c48c9ffd /llvm/lib/VMCore/IntrinsicInst.cpp
parent68c5f477fa30a6b2fa7687536dd3795cf85d0de4 (diff)
downloadbcm5719-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.cpp10
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);
}
OpenPOWER on IntegriCloud