================
@@ -0,0 +1,28 @@
+// RUN: %clang -### -target powerpc-ibm-aix 
-mloadtime-comment-vars=sccsid,version %s 2>&1 | FileCheck %s
+// RUN: %clang -### -target x86_64-linux-gnu 
-mloadtime-comment-vars=sccsid,version %s 2>&1 | FileCheck %s 
--check-prefix=NONAIX
+
+// RUN: %clang -### -target powerpc-ibm-aix -mloadtime-comment-vars=sccsid 
-mloadtime-comment-vars=version,build %s 2>&1 | FileCheck %s 
--check-prefix=MULTI
+// RUN: %clang -### -target x86_64-linux-gnu -mloadtime-comment-vars=sccsid 
-mloadtime-comment-vars=version %s 2>&1 | FileCheck %s 
--check-prefix=NONAIX-MULTI
+
+// Verify the option is forwarded verbatim to cc1 for a supported target.
+// CHECK: "-cc1"
+// CHECK-SAME: "-mloadtime-comment-vars=sccsid,version"
+
+// Verify a warning is emitted and the option is NOT forwarded for an
+// unsupported target.
+// NONAIX: warning: ignoring '-mloadtime-comment-vars=' option as it is not 
currently supported for target 'x86_64-unknown-linux-gnu'
+// NONAIX: "-cc1"
----------------
hubert-reinterpretcast wrote:

This would cause unintentional scoping of the negative test on the next line.
```suggestion
```

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

Reply via email to