[llvm-commits] [llvm] r82568 - /llvm/trunk/include/llvm/Support/IRBuilder.h

Devang Patel dpatel at apple.com
Tue Sep 22 13:54:13 PDT 2009


Author: dpatel
Date: Tue Sep 22 15:54:13 2009
New Revision: 82568

URL: http://llvm.org/viewvc/llvm-project?rev=82568&view=rev
Log:
Check exisiting dbg MDKind first. 

Modified:
    llvm/trunk/include/llvm/Support/IRBuilder.h

Modified: llvm/trunk/include/llvm/Support/IRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/IRBuilder.h?rev=82568&r1=82567&r2=82568&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/IRBuilder.h (original)
+++ llvm/trunk/include/llvm/Support/IRBuilder.h Tue Sep 22 15:54:13 2009
@@ -134,10 +134,10 @@
   /// SetCurrentLocation - This specifies the location information used
   /// by debugging information.
   void SetCurrentLocation(MDNode *L) {
-    if (MDKind == 0) {
-      Context.getMetadata().RegisterMDKind("dbg");
+    if (MDKind == 0) 
       MDKind = Context.getMetadata().getMDKind("dbg");
-    }
+    if (MDKind == 0)
+      MDKind = Context.getMetadata().RegisterMDKind("dbg");
     CurLocation = L;
   }
 





More information about the llvm-commits mailing list