diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-10 00:35:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-10 00:35:59 +0000 |
commit | 5286e774eec4028a0b634f53df5dd1590a38a3b4 (patch) | |
tree | a004484244f26951142f334f6007748a740889af /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 428f71623ba3352b3dd3da09deb19476b7afd971 (diff) | |
download | bcm5719-llvm-5286e774eec4028a0b634f53df5dd1590a38a3b4.tar.gz bcm5719-llvm-5286e774eec4028a0b634f53df5dd1590a38a3b4.zip |
reject codegen of __thread variables as unimplemented, rdar://6775265
llvm-svn: 68755
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index eb190c79e1c..6512dcef9b4 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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 } |