aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-08-08 23:24:23 +0000
committerAnders Carlsson <andersca@mac.com>2009-08-08 23:24:23 +0000
commit89ed31d3f9eeb8ec77c284a5cf404a74bf5e7acf (patch)
tree3db862303fd3fa7d864623de06bfe4d4cd635143 /lib/CodeGen/CodeGenFunction.cpp
parent3b2e16b3d25f6b311dba2871e2a566c96238c3d2 (diff)
Add support for global initializers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78515 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--lib/CodeGen/CodeGenFunction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp
index eae6161e8e..0b012592e4 100644
--- a/lib/CodeGen/CodeGenFunction.cpp
+++ b/lib/CodeGen/CodeGenFunction.cpp
@@ -173,7 +173,7 @@ void CodeGenFunction::StartFunction(const Decl *D, QualType RetTy,
// FIXME: The cast here is a huge hack.
if (CGDebugInfo *DI = getDebugInfo()) {
DI->setLocation(StartLoc);
- if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
+ if (const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(D)) {
DI->EmitFunctionStart(CGM.getMangledName(FD), RetTy, CurFn, Builder);
} else {
// Just use LLVM function name.