summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 27dd600f0a2..5b784aada3f 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -449,6 +449,7 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D) {
}
GV->setInitializer(Init);
+ GV->setConstant(D->getType().isConstant(Context));
// FIXME: This is silly; getTypeAlign should just work for incomplete arrays
unsigned Align;
OpenPOWER on IntegriCloud