summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorVictor Hernandez <vhernandez@apple.com>2010-01-20 05:44:11 +0000
committerVictor Hernandez <vhernandez@apple.com>2010-01-20 05:44:11 +0000
commit20425abea4b3c7fff4e702299491754976f9aebb (patch)
tree0a73815b693ca38825c8073616ef1b4dc875488c /llvm/lib
parente5f2af75942794cb3212b9f60dc9f545477ead8f (diff)
downloadbcm5719-llvm-20425abea4b3c7fff4e702299491754976f9aebb.tar.gz
bcm5719-llvm-20425abea4b3c7fff4e702299491754976f9aebb.zip
Avoid unnecessary Elts array
llvm-svn: 93978
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/DebugInfo.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp
index a16db35a5a3..bdb87f84f6a 100644
--- a/llvm/lib/Analysis/DebugInfo.cpp
+++ b/llvm/lib/Analysis/DebugInfo.cpp
@@ -1059,8 +1059,7 @@ Instruction *DIFactory::InsertDbgValueIntrinsic(Value *V, uint64_t Offset,
if (!ValueFn)
ValueFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_value);
- Value *Elts[] = { V };
- Value *Args[] = { MDNode::get(V->getContext(), Elts, 1),
+ Value *Args[] = { MDNode::get(V->getContext(), &V, 1),
ConstantInt::get(Type::getInt64Ty(V->getContext()), Offset),
D.getNode() };
return CallInst::Create(ValueFn, Args, Args+3, "", InsertBefore);
@@ -1074,8 +1073,7 @@ Instruction *DIFactory::InsertDbgValueIntrinsic(Value *V, uint64_t Offset,
if (!ValueFn)
ValueFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_value);
- Value *Elts[] = { V };
- Value *Args[] = { MDNode::get(V->getContext(), Elts, 1),
+ Value *Args[] = { MDNode::get(V->getContext(), &V, 1),
ConstantInt::get(Type::getInt64Ty(V->getContext()), Offset),
D.getNode() };
return CallInst::Create(ValueFn, Args, Args+3, "", InsertAtEnd);
OpenPOWER on IntegriCloud