From d8e1fd258fac237619d209bd5a6137a84a34ae37 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 20 Jul 2010 20:09:07 +0000 Subject: [PATCH] Use getDebugLoc and setDebugLoc instead of getDbgMetadata and setDbgMetadata, avoiding MDNode overhead. llvm-svn: 108909 --- lib/Transforms/IPO/DeadArgumentElimination.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp index 475eee8b19e..b71bf5ff468 100644 --- a/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp @@ -250,8 +250,7 @@ bool DAE::DeleteDeadVarargs(Function &Fn) { if (cast(Call)->isTailCall()) cast(New)->setTailCall(); } - if (MDNode *N = Call->getDbgMetadata()) - New->setDbgMetadata(N); + New->setDebugLoc(Call->getDebugLoc()); Args.clear(); @@ -780,8 +779,7 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) { if (cast(Call)->isTailCall()) cast(New)->setTailCall(); } - if (MDNode *N = Call->getDbgMetadata()) - New->setDbgMetadata(N); + New->setDebugLoc(Call->getDebugLoc()); Args.clear();