diff options
author | Anders Carlsson <andersca@mac.com> | 2009-08-08 23:24:23 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-08-08 23:24:23 +0000 |
commit | 89ed31d3f9eeb8ec77c284a5cf404a74bf5e7acf (patch) | |
tree | 3db862303fd3fa7d864623de06bfe4d4cd635143 /lib/CodeGen/CGCall.cpp | |
parent | 3b2e16b3d25f6b311dba2871e2a566c96238c3d2 (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/CGCall.cpp')
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 31ed8a6390..12d4d9ca25 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -509,7 +509,7 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI, // initialize the return value. TODO: it might be nice to have // a more general mechanism for this that didn't require synthesized // return statements. - if (const FunctionDecl* FD = dyn_cast<FunctionDecl>(CurFuncDecl)) { + if (const FunctionDecl* FD = dyn_cast_or_null<FunctionDecl>(CurFuncDecl)) { if (FD->hasImplicitReturnZero()) { QualType RetTy = FD->getResultType().getUnqualifiedType(); const llvm::Type* LLVMTy = CGM.getTypes().ConvertType(RetTy); |