From ac1dfba8dd758febaf93f43e600d5542da6cd3e4 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 22 Feb 2018 15:08:47 -0500 Subject: Make `IRGlobalValue::mangledName` a `Name*` This allows us to get rid of `IRGlobalValue::dispose()`. --- source/slang/emit.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/slang/emit.cpp') diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index 3fa50b928..79fd2b444 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -4584,8 +4584,8 @@ emitDeclImpl(decl, nullptr); case kIROp_Func: { auto& mangledName = ((IRGlobalValue*)inst)->mangledName; - if(mangledName.Length() != 0) - return mangledName; + if(getText(mangledName).Length() != 0) + return getText(mangledName); } break; @@ -5582,7 +5582,7 @@ emitDeclImpl(decl, nullptr); // be better strategies (including just stuffing // a pointer to the original decl onto the callee). - UnmangleContext um(func->mangledName); + UnmangleContext um(getText(func->mangledName)); um.startUnmangling(); // We'll read through the qualified name of the @@ -7679,7 +7679,7 @@ emitDeclImpl(decl, nullptr); // actually *require* redeclaration...). // // TODO: can we detect this more robustly? - if(varDecl->mangledName.StartsWith("gl_")) + if(getText(varDecl->mangledName).StartsWith("gl_")) { // The variable represents an OpenGL system value, // so we will assume that it doesn't need to be declared. -- cgit v1.2.3