diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2010-04-18 21:01:23 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-04-18 21:01:23 +0000 |
| commit | 3fef72f0ba99f01b67fc75b8409bdb6d442bd1e6 (patch) | |
| tree | 14fe33d2904703e25455ed0415181ff83c4e9698 /clang/lib/CodeGen/CGExpr.cpp | |
| parent | 7b056bfed007a0e090eca4894988ec4eda4df5d0 (diff) | |
| download | bcm5719-llvm-3fef72f0ba99f01b67fc75b8409bdb6d442bd1e6.tar.gz bcm5719-llvm-3fef72f0ba99f01b67fc75b8409bdb6d442bd1e6.zip | |
Local static variables must be available module-wise
as they are accessible in static methods in a class
local to the same function. Fixes PR6769.
llvm-svn: 101756
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 68f09e2d290..257f2fc4f2f 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -1106,6 +1106,8 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) { bool NonGCable = VD->hasLocalStorage() && !VD->hasAttr<BlocksAttr>(); llvm::Value *V = LocalDeclMap[VD]; + if (!V && VD->isStaticLocal()) + V = CGM.getStaticLocalDeclMap(VD); assert(V && "DeclRefExpr not entered in LocalDeclMap?"); Qualifiers Quals = MakeQualifiers(E->getType()); |

