aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDecl.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-04-14 02:25:56 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-04-14 02:25:56 +0000
commit5466c7b0ca8ce662e2c0bc295cecba2b78d6957d (patch)
treef2e6d04f1fdd87b396c1508c82eaaad032cfd73b /lib/CodeGen/CGDecl.cpp
parentb286a78c8cce4592306dae6abc3656daf6379c77 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69020 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
-rw-r--r--lib/CodeGen/CGDecl.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp
index 4cb4f5530b..c9e47eba77 100644
--- a/lib/CodeGen/CGDecl.cpp
+++ b/lib/CodeGen/CGDecl.cpp
@@ -68,18 +68,19 @@ void CodeGenFunction::EmitBlockVarDecl(const VarDecl &D) {
CGM.ErrorUnsupported(&D, "thread local ('__thread') variable", true);
switch (D.getStorageClass()) {
+ case VarDecl::None:
+ case VarDecl::Auto:
+ case VarDecl::Register:
+ return EmitLocalBlockVarDecl(D);
case VarDecl::Static:
return EmitStaticBlockVarDecl(D);
case VarDecl::Extern:
+ case VarDecl::PrivateExtern:
// Don't emit it now, allow it to be emitted lazily on its first use.
return;
- default:
- assert((D.getStorageClass() == VarDecl::None ||
- D.getStorageClass() == VarDecl::Auto ||
- D.getStorageClass() == VarDecl::Register) &&
- "Unknown storage class");
- return EmitLocalBlockVarDecl(D);
}
+
+ assert(0 && "Unknown storage class");
}
llvm::GlobalVariable *