Avoid unnecessary Elts array
authorVictor Hernandez <vhernandez@apple.com>
Wed, 20 Jan 2010 05:44:11 +0000 (05:44 +0000)
committerVictor Hernandez <vhernandez@apple.com>
Wed, 20 Jan 2010 05:44:11 +0000 (05:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93978 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DebugInfo.cpp

index a16db35a5a30235da282aae43acb13270168fe44..bdb87f84f6ae16c03d581c7e4ed94c83a02a5a81 100644 (file)
@@ -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);