This patch renames the `mroptr` option to `mxcoff-roptr` to indicate in the option itself that it is xcoff specific.
Reviewed By: hubert.reinterpretcast
Differential Revision: https://reviews.llvm.org/D147161
Changes to the PowerPC Backend
------------------------------
-* A new option ``-mroptr`` is added to ``clang`` and ``llc``. When this option
- is present, constant objects with relocatable address values are put into the
- RO data section. This option should be used with the ``-fdata-sections``
+* A new option ``-mxcoff-roptr`` is added to ``clang`` and ``llc``. When this
+ option is present, constant objects with relocatable address values are put
+ into the RO data section. This option should be used with the ``-fdata-sections``
option, and is not supported with ``-fno-data-sections``. The option is
only supported on AIX.
* On AIX, teach the profile runtime to check for a build-id string; such string
CGBINDOPT(JMCInstrument);
static cl::opt<bool> XCOFFReadOnlyPointers(
- "mroptr",
+ "mxcoff-roptr",
cl::desc("When set to true, const objects with relocatable address "
"values are put into the RO data section."),
cl::init(false));
-; RUN: llc -mtriple powerpc-ibm-aix-xcoff -mroptr < %s | FileCheck %s
-; RUN: llc -mtriple powerpc-ibm-aix-xcoff -mroptr -filetype=obj -o %t.o < %s
+; RUN: llc -mtriple powerpc-ibm-aix-xcoff -mxcoff-roptr < %s | FileCheck %s
+; RUN: llc -mtriple powerpc-ibm-aix-xcoff -mxcoff-roptr -filetype=obj -o %t.o < %s
; RUN: llvm-objdump -t --symbol-description %t.o | FileCheck %s --check-prefix=OBJ
-; RUN: not llc -mtriple powerpc-ibm-aix-xcoff -mroptr -data-sections=false \
+; RUN: not llc -mtriple powerpc-ibm-aix-xcoff -mxcoff-roptr -data-sections=false \
; RUN: < %s 2>&1 | FileCheck %s --check-prefix=DS_ERR
-; DS_ERR: -mroptr option must be used with -data-sections
+; DS_ERR: -mxcoff-roptr option must be used with -data-sections
%union.U = type { %"struct.U::A" }
%"struct.U::A" = type { ptr }
-; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -mroptr < %s | FileCheck %s
-; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -mroptr -filetype=obj -o %t.o < %s
+; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -mxcoff-roptr < %s | FileCheck %s
+; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -mxcoff-roptr -filetype=obj -o %t.o < %s
; RUN: llvm-objdump -t --symbol-description %t.o | FileCheck %s --check-prefix=OBJ
-; RUN: not llc -mtriple powerpc64-ibm-aix-xcoff -mroptr -data-sections=false \
+; RUN: not llc -mtriple powerpc64-ibm-aix-xcoff -mxcoff-roptr -data-sections=false \
; RUN: < %s 2>&1 | FileCheck %s --check-prefix=DS_ERR
-; RUN: not llc -mtriple powerpc64le-unknown-linux-gnu -mroptr \
+; RUN: not llc -mtriple powerpc64le-unknown-linux-gnu -mxcoff-roptr \
; RUN: < %s 2>&1 | FileCheck %s --check-prefix=OS_ERR
-; DS_ERR: -mroptr option must be used with -data-sections
-; OS_ERR: -mroptr option is only supported on AIX
+; DS_ERR: -mxcoff-roptr option must be used with -data-sections
+; OS_ERR: -mxcoff-roptr option is only supported on AIX
%union.U = type { %"struct.U::A" }
%"struct.U::A" = type { ptr }
if (Options.XCOFFReadOnlyPointers) {
if (!TheTriple.isOSAIX())
- reportError("-mroptr option is only supported on AIX", InputFilename);
+ reportError("-mxcoff-roptr option is only supported on AIX",
+ InputFilename);
// Since the storage mapping class is specified per csect,
// without using data sections, it is less effective to use read-only
// since we have not found reasons to do otherwise that overcome the user
// surprise of not respecting the setting.
if (!Options.DataSections)
- reportError("-mroptr option must be used with -data-sections",
+ reportError("-mxcoff-roptr option must be used with -data-sections",
InputFilename);
}