diff options
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
-rw-r--r-- | lib/CodeGen/CGDecl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp index c80cecc76e..a3155c4efa 100644 --- a/lib/CodeGen/CGDecl.cpp +++ b/lib/CodeGen/CGDecl.cpp @@ -83,8 +83,8 @@ void CodeGenFunction::EmitStaticBlockVarDecl(const BlockVarDecl &D) { assert(Init && "Unable to create initialiser for static decl"); std::string ContextName; - if (CurFuncDecl) - ContextName = CurFuncDecl->getName(); + if (const FunctionDecl * FD = dyn_cast<FunctionDecl>(CurFuncDecl)) + ContextName = FD->getName(); else assert(0 && "Unknown context for block var decl"); // FIXME Handle objc. |