================
Comment at: lib/CodeGen/CGExpr.cpp:390-395
@@ -372,8 +389,8 @@
   if (auto *Var = dyn_cast<llvm::GlobalVariable>(Object)) {
     // If the temporary is a global and has a constant initializer, we may
     // have already initialized it.
     if (!Var->hasInitializer()) {
       Var->setInitializer(CGM.EmitNullConstant(E->getType()));
       EmitAnyExprToMem(E, Object, Qualifiers(), /*IsInit*/true);
     }
   } else {
----------------
Ah, here's where we deal with this. This code wasn't intended to handle the new 
case, but it it does the right thing, so ... OK then :)

Please update this comment to say "if the temporary is a global or is a 
constant temporary that we promoted to a global" or similar.

http://reviews.llvm.org/D8034

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to