diff options
-rw-r--r-- | llvm/include/llvm/Support/IRBuilder.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/include/llvm/Support/IRBuilder.h b/llvm/include/llvm/Support/IRBuilder.h index b1f4354f484..a948e9f09d2 100644 --- a/llvm/include/llvm/Support/IRBuilder.h +++ b/llvm/include/llvm/Support/IRBuilder.h @@ -134,10 +134,10 @@ public: /// 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; } |