Check exisiting dbg MDKind first.

llvm-svn: 82568
This commit is contained in:
Devang Patel 2009-09-22 20:54:13 +00:00
parent 1d3b6f62df
commit 276b02b325
1 changed files with 3 additions and 3 deletions

View File

@ -134,10 +134,10 @@ public:
/// SetCurrentLocation - This specifies the location information used /// SetCurrentLocation - This specifies the location information used
/// by debugging information. /// by debugging information.
void SetCurrentLocation(MDNode *L) { void SetCurrentLocation(MDNode *L) {
if (MDKind == 0) { if (MDKind == 0)
Context.getMetadata().RegisterMDKind("dbg");
MDKind = Context.getMetadata().getMDKind("dbg"); MDKind = Context.getMetadata().getMDKind("dbg");
} if (MDKind == 0)
MDKind = Context.getMetadata().RegisterMDKind("dbg");
CurLocation = L; CurLocation = L;
} }