Get rid of an unnecessary getMangledName overload.

llvm-svn: 105671
This commit is contained in:
Anders Carlsson
2010-06-09 02:20:01 +00:00
parent 9cdbd9dc08
commit d4ce4e4bc0
2 changed files with 1 additions and 13 deletions

View File

@@ -184,23 +184,12 @@ void CodeGenModule::getMangledName(MangleBuffer &Buffer, GlobalDecl GD) {
if (const CXXDestructorDecl *D = dyn_cast<CXXDestructorDecl>(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());
}