From d4ce4e4bc0137204a865cdf228cd16a41406d16f Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Wed, 9 Jun 2010 02:20:01 +0000 Subject: [PATCH] Get rid of an unnecessary getMangledName overload. llvm-svn: 105671 --- clang/lib/CodeGen/CodeGenModule.cpp | 13 +------------ clang/lib/CodeGen/CodeGenModule.h | 1 - 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 103024c32392..c82642eb6cfe 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 00974c70ec1d..2083cd04dbad 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/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, -- GitLab