Check exisiting dbg MDKind first.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82568 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2009-09-22 20:54:13 +00:00
parent 60cfc03379
commit 14433c96c6

View File

@ -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;
}