[PATCH] D64008: [RISCV] Avoid save-restore target feature warning

Sam Elliott via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 1 07:54:09 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL364777: [RISCV] Avoid save-restore target feature warning (authored by lenary, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D64008?vs=207295&id=207309#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64008/new/

https://reviews.llvm.org/D64008

Files:
  cfe/trunk/lib/Driver/ToolChains/Arch/RISCV.cpp
  cfe/trunk/test/Driver/riscv-features.c


Index: cfe/trunk/lib/Driver/ToolChains/Arch/RISCV.cpp
===================================================================
--- cfe/trunk/lib/Driver/ToolChains/Arch/RISCV.cpp
+++ cfe/trunk/lib/Driver/ToolChains/Arch/RISCV.cpp
@@ -358,14 +358,12 @@
   else
     Features.push_back("-relax");
 
-  // -mno-save-restore is default, unless -msave-restore is specified.
+  // GCC Compatibility: -mno-save-restore is default, unless -msave-restore is
+  // specified...
   if (Args.hasFlag(options::OPT_msave_restore, options::OPT_mno_save_restore, false)) {
-    Features.push_back("+save-restore");
-    // ... but we don't yet support +save-restore, so issue a warning.
+    // ... but we don't support -msave-restore, so issue a warning.
     D.Diag(diag::warn_drv_clang_unsupported)
       << Args.getLastArg(options::OPT_msave_restore)->getAsString(Args);
-  } else {
-    Features.push_back("-save-restore");
   }
 
   // Now add any that the user explicitly requested on the command line,
Index: cfe/trunk/test/Driver/riscv-features.c
===================================================================
--- cfe/trunk/test/Driver/riscv-features.c
+++ cfe/trunk/test/Driver/riscv-features.c
@@ -17,9 +17,5 @@
 // RUN: %clang -target riscv32-unknown-elf -### %s -mno-save-restore 2>&1 | FileCheck %s -check-prefix=NO-SAVE-RESTORE
 
 // SAVE-RESTORE: warning: the clang compiler does not support '-msave-restore'
-// DEFAULT-NOT: warning: the clang compiler does not support
-
-// SAVE-RESTORE: "-target-feature" "+save-restore"
-// NO-SAVE-RESTORE: "-target-feature" "-save-restore"
-// DEFAULT: "-target-feature" "-save-restore"
-// DEFAULT-NOT: "-target-feature" "+save-restore"
\ No newline at end of file
+// NO-SAVE-RESTORE-NOT: warning: the clang compiler does not support
+// DEFAULT-NOT: warning: the clang compiler does not support
\ No newline at end of file


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64008.207309.patch
Type: text/x-patch
Size: 1866 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190701/cbbab693/attachment.bin>


More information about the llvm-commits mailing list