[cfe-commits] r108911 - /cfe/trunk/lib/CodeGen/CGCall.cpp

Dan Gohman gohman at apple.com
Tue Jul 20 13:13:52 PDT 2010


Author: djg
Date: Tue Jul 20 15:13:52 2010
New Revision: 108911

URL: http://llvm.org/viewvc/llvm-project?rev=108911&view=rev
Log:
Use getDebugLoc and setDebugLoc instead of getDbgMetadata and setDbgMetadata,
avoiding MDNode overhead.

Modified:
    cfe/trunk/lib/CodeGen/CGCall.cpp

Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=108911&r1=108910&r2=108911&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Tue Jul 20 15:13:52 2010
@@ -1000,7 +1000,7 @@
     return;
   }
 
-  llvm::MDNode *RetDbgInfo = 0;
+  llvm::DebugLoc RetDbgLoc;
   llvm::Value *RV = 0;
   QualType RetTy = FI.getReturnType();
   const ABIArgInfo &RetAI = FI.getReturnInfo();
@@ -1034,7 +1034,7 @@
       RV = Builder.CreateLoad(ReturnValue);
     } else {
       // Get the stored value and nuke the now-dead store.
-      RetDbgInfo = SI->getDbgMetadata();
+      RetDbgLoc = SI->getDebugLoc();
       RV = SI->getValueOperand();
       SI->eraseFromParent();
       
@@ -1058,8 +1058,7 @@
   }
 
   llvm::Instruction *Ret = RV ? Builder.CreateRet(RV) : Builder.CreateRetVoid();
-  if (RetDbgInfo)
-    Ret->setDbgMetadata(RetDbgInfo);
+  Ret->setDebugLoc(RetDbgLoc);
 }
 
 RValue CodeGenFunction::EmitDelegateCallArg(const VarDecl *Param) {





More information about the cfe-commits mailing list