From 63326a53418b4853a83b360ce1dbdb10c5739fc7 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Mon, 19 Apr 2010 18:15:02 +0000 Subject: Some renaming of methods, fixes typo (related to PR6769). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101794 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExpr.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/CGExpr.cpp') diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 257f2fc4f2..7809972630 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -1106,8 +1106,9 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) { bool NonGCable = VD->hasLocalStorage() && !VD->hasAttr(); llvm::Value *V = LocalDeclMap[VD]; - if (!V && VD->isStaticLocal()) - V = CGM.getStaticLocalDeclMap(VD); + if (!V && getContext().getLangOptions().CPlusPlus && + VD->isStaticLocal()) + V = CGM.getStaticLocalDeclAddress(VD); assert(V && "DeclRefExpr not entered in LocalDeclMap?"); Qualifiers Quals = MakeQualifiers(E->getType()); -- cgit v1.2.3-70-g09d2