From 589f9e3f7845c2a1bf97ae4357aec5b457a5ea19 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sat, 7 Nov 2009 23:16:50 +0000 Subject: Handle member expressions where the member declaration is actually a static variable. Fixes PR5392. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86414 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExpr.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/CodeGen/CGExpr.cpp') diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 323710a104..e489b85291 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -1155,6 +1155,9 @@ LValue CodeGenFunction::EmitMemberExpr(const MemberExpr *E) { return LV; } + if (VarDecl *VD = dyn_cast(ND)) + return EmitGlobalVarDeclLValue(*this, E, VD); + assert(false && "Unhandled member declaration!"); return LValue(); } -- cgit v1.2.3