From 0ca16601290fa748148bc9cba4b63fb07157ea2d Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 14 Apr 2009 02:25:56 +0000 Subject: Audit __private_extern__ handling. - Exposed quite a few Sema issues and a CodeGen crash. - See FIXMEs in test case, and in SemaDecl.cpp (PR3983). I'm skeptical that __private_extern__ should actually be a storage class value. I think that __private_extern__ basically amounts to extern A __attribute__((visibility("hidden"))) and would be better off handled (a) as that, or (b) with an extra bit in the VarDecl. llvm-svn: 69020 --- clang/lib/CodeGen/CGExpr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CGExpr.cpp') diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index fe16c4d30fe7..a1eb5c4e5779 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -632,7 +632,7 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) { isa(VD))) { LValue LV; bool GCable = VD->hasLocalStorage() && ! VD->getAttr(); - if (VD->getStorageClass() == VarDecl::Extern) { + if (VD->hasExternalStorage()) { LV = LValue::MakeAddr(CGM.GetAddrOfGlobalVar(VD), E->getType().getCVRQualifiers(), getContext().getObjCGCAttrKind(E->getType())); -- cgit v1.2.3