From 1860a31edf826bc4001e153f1a8c10e17d97af87 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Fri, 11 Sep 2009 00:11:35 +0000 Subject: Pass the GlobalDecl to getMangledName, fixes PR4890. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81486 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenFunction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/CodeGenFunction.cpp') diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index d42d0723fa..a3ce8a5958 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -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(D)) { - DI->EmitFunctionStart(CGM.getMangledName(FD), RetTy, CurFn, Builder); + if (isa(D)) { + DI->EmitFunctionStart(CGM.getMangledName(GD), RetTy, CurFn, Builder); } else { // Just use LLVM function name. -- cgit v1.2.3-18-g5258