summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-09-22 20:54:13 +0000
committerDevang Patel <dpatel@apple.com>2009-09-22 20:54:13 +0000
commit276b02b325ffed6cfe7019898c63de8e10d9bc84 (patch)
tree48dfe930537aabfe0506fde7e714917a927056e6
parent1d3b6f62dfe03256b0becc5c8ecfcd606df1fa6a (diff)
downloadbcm5719-llvm-276b02b325ffed6cfe7019898c63de8e10d9bc84.tar.gz
bcm5719-llvm-276b02b325ffed6cfe7019898c63de8e10d9bc84.zip
Check exisiting dbg MDKind first.
llvm-svn: 82568
-rw-r--r--llvm/include/llvm/Support/IRBuilder.h6
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;
}
OpenPOWER on IntegriCloud