[clang] [PowerPC] Support mcmodel=large for AIX (PR #70652)

via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 30 04:42:34 PDT 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Qiu Chaofan (ecnelises)

<details>
<summary>Changes</summary>

7e42545 rejects unsupported mcmodel options, but large should be a supported model for 32-bit AIX targets.

---
Full diff: https://github.com/llvm/llvm-project/pull/70652.diff


1 Files Affected:

- (modified) clang/lib/Driver/ToolChains/Clang.cpp (+1-1) 


``````````diff
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 43a92adbef64ba8..6fbdf2c21952d00 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -5723,7 +5723,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   if (Arg *A = Args.getLastArg(options::OPT_mcmodel_EQ)) {
     StringRef CM = A->getValue();
     bool Ok = false;
-    if (Triple.isOSAIX() && CM == "medium") {
+    if (Triple.isOSAIX() && (CM == "medium" || CM == "large")) {
       CM = "large";
       Ok = true;
     }

``````````

</details>


https://github.com/llvm/llvm-project/pull/70652


More information about the cfe-commits mailing list