aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
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
commitc8b7cd05cc328d6adaef76df43ede70af193dc2c (patch)
treef601c315f98b67a81229fcc174c4f9c9014e23e1 /lib/Analysis
parent8fffff537194e2375e65600f27d716c99f0eb38a (diff)
downloadexternal_llvm-c8b7cd05cc328d6adaef76df43ede70af193dc2c.zip
external_llvm-c8b7cd05cc328d6adaef76df43ede70af193dc2c.tar.gz
external_llvm-c8b7cd05cc328d6adaef76df43ede70af193dc2c.tar.bz2
Avoid unnecessary Elts array
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93978 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/DebugInfo.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index a16db35..bdb87f8 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/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);