From b75863d53b8a2bbf0ece8e6df2b6e5be7f3896c4 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 10 Apr 2009 00:35:59 +0000 Subject: reject codegen of __thread variables as unimplemented, rdar://6775265 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68755 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CodeGenModule.cpp') diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index eb190c79e1..6512dcef9b 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -614,6 +614,10 @@ llvm::Constant *CodeGenModule::GetOrCreateLLVMGlobal(const char *MangledName, return llvm::ConstantExpr::getBitCast(Entry, Ty); } + // We don't support __thread yet. + if (D && D->isThreadSpecified()) + ErrorUnsupported(D, "thread local ('__thread') variable", true); + // This is the first use or definition of a mangled name. If there is a // deferred decl with this name, remember that we need to emit it at the end // of the file. @@ -680,7 +684,7 @@ CodeGenModule::CreateRuntimeVariable(const llvm::Type *Ty, void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D) { llvm::Constant *Init = 0; QualType ASTTy = D->getType(); - + if (D->getInit() == 0) { // This is a tentative definition; tentative definitions are // implicitly initialized with { 0 } -- cgit v1.2.3