From b8ad556b09acb49478d63867494501b110b5cdaf Mon Sep 17 00:00:00 2001 From: Victor Hernandez Date: Wed, 20 Jan 2010 05:44:11 +0000 Subject: [PATCH] Avoid unnecessary Elts array llvm-svn: 93978 --- lib/Analysis/DebugInfo.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp index a16db35a5a3..bdb87f84f6a 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);