xur added a comment. Sean: Adding a new CC1 option ProfileClangInstr will make things cleaner. But this won't solve the problem. The root of all the mess is there is no driver level option for IR instrumentation. I need to either "hijack" the -Xclang option, or move the logic to CompilerInvocation.cpp, which both you don't like.
The reason is I have to reply on the Driver option -fprofile-instr-generate to have the right link line for the profile library. -fprofile-instr-generate will set the Instrumentation to Clang (regardless use of current cc1 option of -fprofile-instr-generate, or the new proposed -fprofile-clang-instr). For IR instrumentation where the user specifies "-Xclang -fprofile-ir-instr", I need to overwrite the driver level option. To get that, I either parse the -Xclang value (this is "hijack), or I handle it in CC1 (in CompilerInvocation.cpp). I don't see a way to avoid it. Can we use a hidden driver option here for IR instrumentation? http://reviews.llvm.org/D15829 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits