diff options
author | Chris Lattner <sabre@nondot.org> | 2008-04-04 04:07:35 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-04-04 04:07:35 +0000 |
commit | c8aa5f1f264fb230c38182adab944232bb160c2b (patch) | |
tree | a7ab47baf8db212c4cb252e010d502e097930b86 /lib/CodeGen/CGDecl.cpp | |
parent | 1330b0e6e4a6ad2d586c4a45d6cece5611829a16 (diff) |
Codegen assignment to self correctly, patch by David Chisnall!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49201 91177308-0d34-0410-b5e6-96231b3b80d8
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. |