aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDecl.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-02-13 22:58:39 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-02-13 22:58:39 +0000
commite4c9238795d206e22694101d6d727d2ee1f0028d (patch)
treecd627522716af5a55ae6b919bb08151be3f44ba7 /lib/CodeGen/CGDecl.cpp
parent7ab41f790c17258deaed7378217550b4d7d707d8 (diff)
Set constant bit on static block vars as well. Patch by Anders Johnson!q
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64502 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
-rw-r--r--lib/CodeGen/CGDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp
index ddc68d68c5..bb2705ff60 100644
--- a/lib/CodeGen/CGDecl.cpp
+++ b/lib/CodeGen/CGDecl.cpp
@@ -109,7 +109,7 @@ CodeGenFunction::GenerateStaticBlockVarDecl(const VarDecl &D,
assert(0 && "Unknown context for block var decl");
llvm::GlobalValue *GV =
- new llvm::GlobalVariable(Init->getType(), false,
+ new llvm::GlobalVariable(Init->getType(), Ty.isConstant(getContext()),
Linkage,
Init, ContextName + Separator +D.getNameAsString(),
&CGM.getModule(), 0, Ty.getAddressSpace());