[PATCH] D65974: Driver: Don't warn about assembler flags being unused when not assembling AND not using the integrated assembler
Douglas Yung via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 8 19:11:03 PDT 2019
dyung updated this revision to Diff 214278.
dyung added a comment.
Reverted changes in Clang.cpp and updated test to expect warning when an external assembler is requested.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65974/new/
https://reviews.llvm.org/D65974
Files:
clang/test/Driver/as-options.s
Index: clang/test/Driver/as-options.s
===================================================================
--- clang/test/Driver/as-options.s
+++ clang/test/Driver/as-options.s
@@ -39,30 +39,62 @@
// Test that assembler options don't cause warnings when there's no assembler
// stage.
-// RUN: %clang -mincremental-linker-compatible -E \
+// RUN: %clang -mincremental-linker-compatible -E -fintegrated-as \
// RUN: -o /dev/null -x c++ %s 2>&1 \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
-// RUN: %clang -mincremental-linker-compatible -E \
+// RUN: %clang -mincremental-linker-compatible -E -fno-integrated-as \
+// RUN: -o /dev/null -x c++ %s 2>&1 \
+// RUN: | FileCheck --check-prefix=WARN --allow-empty %s
+
+// RUN: %clang -mincremental-linker-compatible -E -fintegrated-as \
// RUN: -o /dev/null -x assembler-with-cpp %s 2>&1 \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
+// RUN: %clang -mincremental-linker-compatible -E -fno-integrated-as \
+// RUN: -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN: | FileCheck --check-prefix=WARN --allow-empty %s
+
// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
-// RUN: -o /dev/null -x c++ %s 2>&1 \
+// RUN: -fintegrated-as -o /dev/null -x c++ %s 2>&1 \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
-// RUN: -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN: -fno-integrated-as -o /dev/null -x c++ %s 2>&1 \
+// RUN: | FileCheck --check-prefix=WARN --allow-empty %s
+
+// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
+// RUN: -fintegrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
+// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
+// RUN: -fno-integrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN: | FileCheck --check-prefix=WARN --allow-empty %s
+
+// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fintegrated-as \
+// RUN: -o /dev/null -x c++ %s 2>&1 \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
-// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E \
+// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fno-integrated-as \
// RUN: -o /dev/null -x c++ %s 2>&1 \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
-// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E \
+
+// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fintegrated-as \
// RUN: -o /dev/null -x assembler-with-cpp %s 2>&1 \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
-// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E \
+// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fno-integrated-as \
+// RUN: -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
+
+// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E -fintegrated-as \
// RUN: -o /dev/null -x c++ %s 2>&1 \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E \
+// RUN: -fno-integrated-as -o /dev/null -x c++ %s 2>&1 \
+// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
+
+// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E -fintegrated-as \
// RUN: -o /dev/null -x assembler-with-cpp %s 2>&1 \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
+// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E \
+// RUN: -fno-integrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
+
// NOWARN-NOT: unused
// Test that unsupported arguments do not cause errors when -fno-integrated-as
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65974.214278.patch
Type: text/x-patch
Size: 3833 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190809/68954bd3/attachment.bin>
More information about the cfe-commits
mailing list