MatzeB added inline comments. ================ Comment at: lib/Driver/Tools.cpp:6102 @@ +6101,3 @@ + StatsFile.assign(Output.getFilename()); + llvm::sys::path::remove_filename(StatsFile); + } ---------------- bruno wrote: > Why removing StatsFile here? IIUC, at this point StatsFile is still the same > as the output (if it's a file). a) It behaves like -save-temps=obj (`clang -save-temps=obj foo.c -o bar` will give you foo.i, foo.o, ...; b) This makes sense when you have multiple (`clang -save-stats=obj foo.c bar.c -o baz`) inputs for which you need multiple .stats filenames but you only have 1 output name c) It magically works for `-o -` as well
Repository: rL LLVM https://reviews.llvm.org/D24820 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits