================
@@ -0,0 +1,87 @@
+; REQUIRES: x86
+; RUN: llvm-as %s -o %t.obj
+
+; RUN: rm -f %t.yaml %t.pass.yaml %t.hot.yaml %t.t300.yaml %t.t301.yaml
+; RUN: lld-link -opt-remarks-filename %t.yaml %t.obj -entry:main -nodefaultlib 
\
+; RUN:   -out:%t.exe -force:unresolved
+; RUN: cat %t.yaml | FileCheck %s -check-prefix=YAML
+
+; RUN: lld-link -opt-remarks-filename %t.pass.yaml -opt-remarks-passes inline \
+; RUN:   %t.obj -entry:main -nodefaultlib -out:%t.exe -force:unresolved
+; RUN: cat %t.pass.yaml | FileCheck %s -check-prefix=YAML-PASSES
+
+; RUN: lld-link -opt-remarks-with-hotness -opt-remarks-filename %t.hot.yaml \
+; RUN:   %t.obj -entry:main -nodefaultlib -out:%t.exe -force:unresolved
+; RUN: cat %t.hot.yaml | FileCheck %s -check-prefix=YAML-HOT
+
+; RUN: lld-link -opt-remarks-with-hotness \
+; RUN:   -opt-remarks-hotness-threshold:300 \
+; RUN:   -opt-remarks-filename %t.t300.yaml %t.obj -entry:main -nodefaultlib \
+; RUN:   -out:%t.exe -force:unresolved
+; RUN: FileCheck %s -check-prefix=YAML-HOT < %t.t300.yaml
+
+; RUN: lld-link -opt-remarks-with-hotness \
+; RUN:   -opt-remarks-hotness-threshold:301 \
+; RUN:   -opt-remarks-filename %t.t301.yaml %t.obj -entry:main -nodefaultlib \
+; RUN:   -out:%t.exe -force:unresolved
+; RUN: count 0 < %t.t301.yaml
+
+; RUN: lld-link -opt-remarks-filename %t.yaml -opt-remarks-format yaml \
+; RUN:   %t.obj -entry:main -nodefaultlib -out:%t.exe -force:unresolved
+; RUN: FileCheck %s -check-prefix=YAML < %t.yaml
----------------
mstorsjo wrote:

If the primary way that Clang would pass these options is through 
`-plugin-opt...` then we do want to have a test to cover (and showcase) that as 
well, even if the primary way of using it in direct `lld-link` calls is through 
the native form of the options.

https://github.com/llvm/llvm-project/pull/205390
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to