summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/CGDeclCXX.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-05-04 20:51:19 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-05-04 20:51:19 +0000
commit7e411337c0ed226dace6e07f1420486768161308 (patch)
tree938fcb7c80a0402925b5b00fa684a245ab0936a5 /lib/CodeGen/CGDeclCXX.cpp
parent8aaf5818a64e9f7687798852af5945b053c68a54 (diff)
downloadFreeBSD-src-7e411337c0ed226dace6e07f1420486768161308.zip
FreeBSD-src-7e411337c0ed226dace6e07f1420486768161308.tar.gz
Update clang to r103052.
Diffstat (limited to 'lib/CodeGen/CGDeclCXX.cpp')
-rw-r--r--lib/CodeGen/CGDeclCXX.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/CGDeclCXX.cpp b/lib/CodeGen/CGDeclCXX.cpp
index f6c805f..6afa538 100644
--- a/lib/CodeGen/CGDeclCXX.cpp
+++ b/lib/CodeGen/CGDeclCXX.cpp
@@ -279,6 +279,9 @@ static llvm::Constant *getGuardAbortFn(CodeGenFunction &CGF) {
void
CodeGenFunction::EmitStaticCXXBlockVarDeclInit(const VarDecl &D,
llvm::GlobalVariable *GV) {
+ // Bail out early if this initializer isn't reachable.
+ if (!Builder.GetInsertBlock()) return;
+
bool ThreadsafeStatics = getContext().getLangOptions().ThreadsafeStatics;
llvm::SmallString<256> GuardVName;
OpenPOWER on IntegriCloud