davidxl added inline comments. ================ Comment at: lib/CodeGen/CodeGenModule.cpp:150 @@ -149,2 +149,3 @@ - if (!CodeGenOpts.InstrProfileInput.empty()) { + if (!CodeGenOpts.hasProfileIRInstr() && + !CodeGenOpts.InstrProfileInput.empty()) { ---------------- Better to use if (CodeGenOpts.hasProfileClangInstr() && ..)
================ Comment at: lib/Driver/Tools.cpp:3201 @@ +3200,3 @@ +// Set the profile kind if it's not the default clang kind. +static void setProfileKindFlag(ArgStringList &CmdArgs, + std::string ProfileName) { ---------------- I don't quite like this change in the driver. I think the right thing to do is: 1) for profile use case, there is no need to pass -fprofile-instrument=<...> FE option from the driver 2) The profileInstrKind determination needs to happen in FE (not driver) by peeking into the passed in profile data. http://reviews.llvm.org/D15829 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits