[PATCH] D45275: Add support for LTO options

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 4 11:23:32 PDT 2018


ruiu added a comment.

Generally looking good.



================
Comment at: lld/ELF/Driver.cpp:660-663
+  Config->LTOSampleProfile = Args.getLastArgValue(OPT_lto_sample_profile);
+  Config->LTONewPassManager =
+      Args.hasFlag(OPT_lto_new_pass_manager, OPT_lto_new_pass_manager, false);
   Config->LTONewPmPasses = Args.getLastArgValue(OPT_lto_newpm_passes);
----------------
Please sort alphabetically.


================
Comment at: lld/ELF/LTO.cpp:108
+
+  if (!Config->LTOSampleProfile.empty())
+    Conf.SampleProfile = Config->LTOSampleProfile;
----------------
Do you need this if? I thought you could copy a string even if it is empty.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D45275





More information about the llvm-commits mailing list