summaryrefslogtreecommitdiff
path: root/lib/VMCore/IntrinsicInst.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/IntrinsicInst.cpp')
-rw-r--r--lib/VMCore/IntrinsicInst.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/VMCore/IntrinsicInst.cpp b/lib/VMCore/IntrinsicInst.cpp
index 098d232697..c37d5b03cd 100644
--- a/lib/VMCore/IntrinsicInst.cpp
+++ b/lib/VMCore/IntrinsicInst.cpp
@@ -54,7 +54,7 @@ Value *DbgInfoIntrinsic::StripCast(Value *C) {
///
Value *DbgDeclareInst::getAddress() const {
- if (MDNode* MD = cast_or_null<MDNode>(getOperand(0)))
+ if (MDNode* MD = cast_or_null<MDNode>(getOperand(1)))
return MD->getOperand(0);
else
return NULL;
@@ -65,9 +65,9 @@ Value *DbgDeclareInst::getAddress() const {
///
const Value *DbgValueInst::getValue() const {
- return cast<MDNode>(getOperand(0))->getOperand(0);
+ return cast<MDNode>(getOperand(1))->getOperand(0);
}
Value *DbgValueInst::getValue() {
- return cast<MDNode>(getOperand(0))->getOperand(0);
+ return cast<MDNode>(getOperand(1))->getOperand(0);
}