[clang] [Clang][Driver][LTO] Fix empty stats filename when in LTO mode (PR #71197)

Min-Yih Hsu via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 5 11:30:32 PST 2023


================
@@ -20,6 +20,8 @@
 // CHECK-INVALID: invalid value 'bla' in '-save-stats=bla'
 
 // RUN: %clang -target x86_64-linux-unknown -save-stats -flto -o obj/dir/save-stats.exe %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-LTO
+// Previously `-plugin-opt=stats-file` would use empty filename if a linker flag (i.e. -Wl) is presented before any input filename.
+// RUN: %clang -target x86_64-linux-unknown -save-stats -flto -o obj/dir/save-stats.exe -Wl,-plugin-opt=-dummy %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-LTO
----------------
mshockwave wrote:

Done

https://github.com/llvm/llvm-project/pull/71197


More information about the cfe-commits mailing list