summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGDecl.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index 91071afeb80..3a4ef953504 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -127,11 +127,9 @@ void CodeGenFunction::EmitStaticBlockVarDecl(const VarDecl &D) {
GenerateStaticCXXBlockVarDeclInit(D, GV);
} else {
// The initializer may differ in type from the global. Rewrite
- // the global to match the initializer!?
- //
- // FIXME: This matches what we have been doing historically, but
- // it seems bad. Shouldn't the init expression have the right
- // type?
+ // the global to match the initializer. (We have to do this
+ // because some types, like unions, can't be completely represented
+ // in the LLVM type system.)
if (GV->getType() != Init->getType()) {
llvm::GlobalVariable *OldGV = GV;
OpenPOWER on IntegriCloud