tejohnson added a comment.

Interested in pcc's thoughts, as https://bugs.llvm.org/show_bug.cgi?id=32155 
mentioned you already discussed with him. Note that some of the passes that 
check PassManagerBuilder::sizeLevel are added during the ThinLTO back end (e.g. 
populateModulePassManager which checks sizeLevel is invoked by 
populateThinLTOPassManager). Until everything is converted to using size 
attributes, it seems like a correct fix for the bug is to accept these options 
in the gold-plugin and pass through the LTO API to the PassManagerBuilder.



================
Comment at: lib/Driver/ToolChains/CommonArgs.cpp:369
     if (A->getOption().matches(options::OPT_O4) ||
-        A->getOption().matches(options::OPT_Ofast))
+        A->getOption().matches(options::OPT_Ofast)) {
       OOpt = "3";
----------------
Remove added "{"


================
Comment at: lib/Driver/ToolChains/CommonArgs.cpp:377
+        OOpt = OptLevel;
+    } else if (A->getOption().matches(options::OPT_O0)) {
       OOpt = "0";
----------------
Ditto about unnecessary "{"


https://reviews.llvm.org/D30920



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to