Use explicit target in clang/test/Preprocessor/directives_asm.S
authorJohn Brawn <john.brawn@arm.com>
Tue, 7 Mar 2023 18:02:15 +0000 (18:02 +0000)
committerJohn Brawn <john.brawn@arm.com>
Tue, 7 Mar 2023 18:06:41 +0000 (18:06 +0000)
This prevents the test from failing when the default target doesn't
support the .warning directive.

clang/test/Preprocessor/directives_asm.S

index 55e71d6..a384b91 100644 (file)
@@ -1,4 +1,5 @@
-// RUN: %clang -c %s -o /dev/null 2>&1 | FileCheck %s
+// REQUIRES: x86-registered-target
+// RUN: %clang --target=i386-pc-linux -c %s -o /dev/null 2>&1 | FileCheck %s
 
 // Check that preprocessor directives are recognised as such, but lines starting
 // with a # that aren't directives are instead treated as comments.
@@ -6,7 +7,7 @@
 #define MACRO .warning "This is a macro"
         MACRO
 
-// CHECK: directives_asm.S:7:9: warning: This is a macro
+// CHECK: directives_asm.S:8:9: warning: This is a macro
 
 #not a preprocessing directive
 
@@ -16,7 +17,7 @@
 
         .warning "line number should not change"
 
-// CHECK: directives_asm.S:17:9: warning: line number should not change
+// CHECK: directives_asm.S:18:9: warning: line number should not change
 
 #line 100