Pass the GlobalDecl to getMangledName, fixes PR4890.

llvm-svn: 81486
This commit is contained in:
Anders Carlsson 2009-09-11 00:11:35 +00:00
parent 73fcc95f0f
commit fd384d8065
2 changed files with 8 additions and 2 deletions

View File

@ -175,8 +175,8 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy,
// FIXME: The cast here is a huge hack.
if (CGDebugInfo *DI = getDebugInfo()) {
DI->setLocation(StartLoc);
if (const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(D)) {
DI->EmitFunctionStart(CGM.getMangledName(FD), RetTy, CurFn, Builder);
if (isa<FunctionDecl>(D)) {
DI->EmitFunctionStart(CGM.getMangledName(GD), RetTy, CurFn, Builder);
} else {
// Just use LLVM function name.

View File

@ -0,0 +1,6 @@
// RUN: clang-cc -emit-llvm-only -g %s
struct X {
~X();
};
X::~X() { }