diff options
author | Devang Patel <dpatel@apple.com> | 2009-09-22 20:54:13 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-09-22 20:54:13 +0000 |
commit | 276b02b325ffed6cfe7019898c63de8e10d9bc84 (patch) | |
tree | 48dfe930537aabfe0506fde7e714917a927056e6 | |
parent | 1d3b6f62dfe03256b0becc5c8ecfcd606df1fa6a (diff) | |
download | bcm5719-llvm-276b02b325ffed6cfe7019898c63de8e10d9bc84.tar.gz bcm5719-llvm-276b02b325ffed6cfe7019898c63de8e10d9bc84.zip |
Check exisiting dbg MDKind first.
llvm-svn: 82568
-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; } |