summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-09-11 00:11:35 +0000
committerAnders Carlsson <andersca@mac.com>2009-09-11 00:11:35 +0000
commitfd384d80653e4832c0b7277c16a844586c34e8a7 (patch)
tree2e6627a69b15fbd041040bcb324f17ecdb38da0c /clang/lib/CodeGen/CodeGenFunction.cpp
parent73fcc95f0fdebdae62dbef9174b8a775c01affe9 (diff)
downloadbcm5719-llvm-fd384d80653e4832c0b7277c16a844586c34e8a7.tar.gz
bcm5719-llvm-fd384d80653e4832c0b7277c16a844586c34e8a7.zip
Pass the GlobalDecl to getMangledName, fixes PR4890.
llvm-svn: 81486
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index d42d0723fa8..a3ce8a59586 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/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<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.
OpenPOWER on IntegriCloud