summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-11-07 23:16:50 +0000
committerAnders Carlsson <andersca@mac.com>2009-11-07 23:16:50 +0000
commit589f9e3f7845c2a1bf97ae4357aec5b457a5ea19 (patch)
tree5f4ad1401bc41d6d0b9855aa5d5949211516a333 /lib/CodeGen/CGExpr.cpp
parentce53f7dbe7406a253c6b2d93ff2727079087d9cc (diff)
downloadclang-589f9e3f7845c2a1bf97ae4357aec5b457a5ea19.tar.gz
clang-589f9e3f7845c2a1bf97ae4357aec5b457a5ea19.tar.bz2
clang-589f9e3f7845c2a1bf97ae4357aec5b457a5ea19.tar.xz
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
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r--lib/CodeGen/CGExpr.cpp3
1 files changed, 3 insertions, 0 deletions
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<VarDecl>(ND))
+ return EmitGlobalVarDeclLValue(*this, E, VD);
+
assert(false && "Unhandled member declaration!");
return LValue();
}