[PATCH] D15070: [mips] Added support for -Wa, -mips32 and similar.
Daniel Sanders via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 18 03:28:38 PST 2015
dsanders accepted this revision.
dsanders added a comment.
This revision is now accepted and ready to land.
With a couple small changes it will LGTM
================
Comment at: lib/Driver/Tools.cpp:2567-2568
@@ -2547,1 +2566,4 @@
}
+ StringRef MipsFeatureStringRef = MipsTargetFeature;
+ if (MipsFeatureStringRef != "") {
+ CmdArgs.push_back("-target-feature");
----------------
It would be better to use a null pointer check and use nullptr instead of the empty strings in the initial and default cases.
================
Comment at: test/Driver/mips-ias-Wa.s:121-129
@@ +120,11 @@
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -Wa,-mips64r6 2>&1 | \
+// RUN: FileCheck -check-prefix=MIPS64R6 %s
+// MIPS64R6: -cc1as
+// MIPS64R6: "-target-feature" "+mips64r6"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -Wa,-mips64r2,-mips4 2>&1 | \
+// RUN: FileCheck -check-prefix=MIPS64R2-MIPS4 %s
+// MIPS64R2-MIPS4: -cc1as
+// MIPS64R2-MIPS4: "-target-feature" "+mips4"
+// MIPS64R2-MIPS4-NOT: "-target-feature" "+mips64r2"
----------------
You need to check the CHECK-NOT's on both sides of the CHECK.
http://reviews.llvm.org/D15070
More information about the cfe-commits
mailing list