[llvm-commits] [llvm] r93978 - /llvm/trunk/lib/Analysis/DebugInfo.cpp
Victor Hernandez
vhernandez at apple.com
Tue Jan 19 21:44:15 PST 2010
Author: hernande
Date: Tue Jan 19 23:44:11 2010
New Revision: 93978
URL: http://llvm.org/viewvc/llvm-project?rev=93978&view=rev
Log:
Avoid unnecessary Elts array
Modified:
llvm/trunk/lib/Analysis/DebugInfo.cpp
Modified: llvm/trunk/lib/Analysis/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DebugInfo.cpp?rev=93978&r1=93977&r2=93978&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/DebugInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/DebugInfo.cpp Tue Jan 19 23:44:11 2010
@@ -1059,8 +1059,7 @@
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 @@
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);
More information about the llvm-commits
mailing list