From: Anders Carlsson Date: Wed, 9 Jun 2010 02:20:01 +0000 (+0000) Subject: Get rid of an unnecessary getMangledName overload. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=afd04290de594111fe0f5917317e3a68e28639cf;p=clang Get rid of an unnecessary getMangledName overload. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105671 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 103024c323..c82642eb6c 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -184,23 +184,12 @@ void CodeGenModule::getMangledName(MangleBuffer &Buffer, GlobalDecl GD) { if (const CXXDestructorDecl *D = dyn_cast(ND)) return getMangledCXXDtorName(Buffer, D, GD.getDtorType()); - return getMangledName(Buffer, ND); -} - -/// \brief Retrieves the mangled name for the given declaration. -/// -/// If the given declaration requires a mangled name, returns an -/// const char* containing the mangled name. Otherwise, returns -/// the unmangled name. -/// -void CodeGenModule::getMangledName(MangleBuffer &Buffer, - const NamedDecl *ND) { if (!getMangleContext().shouldMangleDeclName(ND)) { assert(ND->getIdentifier() && "Attempt to mangle unnamed decl."); Buffer.setString(ND->getNameAsCString()); return; } - + getMangleContext().mangleName(ND, Buffer.getBuffer()); } diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index 00974c70ec..2083cd04db 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -432,7 +432,6 @@ public: unsigned &CallingConv); void getMangledName(MangleBuffer &Buffer, GlobalDecl D); - void getMangledName(MangleBuffer &Buffer, const NamedDecl *ND); void getMangledName(MangleBuffer &Buffer, const BlockDecl *BD); void getMangledCXXCtorName(MangleBuffer &Buffer, const CXXConstructorDecl *D,