================
Comment at: lib/CodeGen/CodeGenModule.cpp:1823
@@ +1822,3 @@
+ const CXXConstructorDecl *CD = E->getConstructor();
+ IsTrivialDefaultCtor = (CD->isTrivial() && CD->isDefaultConstructor());
+ }
----------------
This should never happen -- NeedsGlobalCtor should be false if the
initialization is trivial. If not, we should fix EmitConstantInit to handle
this case.
================
Comment at: lib/CodeGen/CodeGenModule.cpp:1816
@@ -1819,3 +1815,3 @@
// If we are compiling with ASan, add metadata indicating dynamically
- // initialized globals.
+ // initialized globals. Do this before we emit initializer function.
if (SanOpts.Address && NeedsGlobalCtor) {
----------------
Why does this need to be before we emit the initializer?
http://llvm-reviews.chandlerc.com/D608
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits