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 | 5506f8cf4c6e9f606990bf69561abeb83d4100f3 (patch) | |
tree | d987dfdc575a6c4d811d04f4b7ab9cce55b5a571 /clang/lib/CodeGen/CGDecl.cpp | |
parent | 002e4bd158d3142681847670c9d4f0754f166767 (diff) | |
download | bcm5719-llvm-5506f8cf4c6e9f606990bf69561abeb83d4100f3.tar.gz bcm5719-llvm-5506f8cf4c6e9f606990bf69561abeb83d4100f3.zip |
Codegen assignment to self correctly, patch by David Chisnall!
llvm-svn: 49201
Diffstat (limited to 'clang/lib/CodeGen/CGDecl.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDecl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index c80cecc76ee..a3155c4efa1 100644 --- a/clang/lib/CodeGen/CGDecl.cpp +++ b/clang/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. |