aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDecl.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-03-04 04:22:58 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-03-04 04:22:58 +0000
commit074dda6d81315d3e1414ce018325c166bcb02028 (patch)
tree48b3215560740a168a6c1c6983a24ae0522e3259 /lib/CodeGen/CGDecl.cpp
parent25615424741bcce31fe52c896f76268f0307f00d (diff)
Comment fix: change a question to an answer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66010 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
-rw-r--r--lib/CodeGen/CGDecl.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp
index 91071afeb8..3a4ef95350 100644
--- a/lib/CodeGen/CGDecl.cpp
+++ b/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;