[PATCH] D39376: [PowerPC] Add implementation for -msave-toc-indirect option - clang portion

Zaara Syeda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 27 08:42:48 PDT 2017


syzaara created this revision.

Add clang option -msave-toc-indirect for PowerPC.


https://reviews.llvm.org/D39376

Files:
  include/clang/Driver/Options.td
  test/Driver/ppc-features.cpp


Index: test/Driver/ppc-features.cpp
===================================================================
--- test/Driver/ppc-features.cpp
+++ test/Driver/ppc-features.cpp
@@ -134,6 +134,9 @@
 // RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-vsx -mvsx -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-VSX %s
 // CHECK-VSX: "-target-feature" "+vsx"
 
+// RUN: %clang -target powerpc64-unknown-linux-gnu %s -msave-toc-indirect -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-TOC %s
+// CHECK-TOC: "-target-feature" "+save-toc-indirect"
+
 // RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-htm -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOHTM %s
 // CHECK-NOHTM: "-target-feature" "-htm"
 
Index: include/clang/Driver/Options.td
===================================================================
--- include/clang/Driver/Options.td
+++ include/clang/Driver/Options.td
@@ -1904,6 +1904,7 @@
 def maltivec : Flag<["-"], "maltivec">, Group<m_ppc_Features_Group>;
 def mno_altivec : Flag<["-"], "mno-altivec">, Group<m_ppc_Features_Group>;
 def mvsx : Flag<["-"], "mvsx">, Group<m_ppc_Features_Group>;
+def msave_toc_indirect : Flag<["-"], "msave-toc-indirect">, Group<m_ppc_Features_Group>;
 def mno_vsx : Flag<["-"], "mno-vsx">, Group<m_ppc_Features_Group>;
 def mpower8_vector : Flag<["-"], "mpower8-vector">,
     Group<m_ppc_Features_Group>;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39376.120618.patch
Type: text/x-patch
Size: 1368 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171027/b2ac0931/attachment.bin>


More information about the cfe-commits mailing list