diff options
| author | Aiden Grossman <aidengrossman@google.com> | 2025-11-01 19:51:33 +0000 |
|---|---|---|
| committer | Aiden Grossman <aidengrossman@google.com> | 2025-11-01 19:51:33 +0000 |
| commit | c1f7394c1888c12b56cbf437b4c0aceb2a448fd8 (patch) | |
| tree | 247d350c087af607a1db7c48d4839067991fc0e8 /llvm/lib/TargetParser/TargetDataLayout.cpp | |
| parent | f1528eba6a614787f5d896512b20702b9512294d (diff) | |
| parent | 2e5577a9d5db6b05cbb7ddca9ed508778e080d0e (diff) | |
Created using spr 1.3.7
Diffstat (limited to 'llvm/lib/TargetParser/TargetDataLayout.cpp')
| -rw-r--r-- | llvm/lib/TargetParser/TargetDataLayout.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/TargetParser/TargetDataLayout.cpp b/llvm/lib/TargetParser/TargetDataLayout.cpp index d765d9ccb284..d7359234b02f 100644 --- a/llvm/lib/TargetParser/TargetDataLayout.cpp +++ b/llvm/lib/TargetParser/TargetDataLayout.cpp @@ -208,7 +208,7 @@ static std::string computeMipsDataLayout(const Triple &TT, StringRef ABIName) { return Ret; } -static std::string computePowerDataLayout(const Triple &T) { +static std::string computePowerDataLayout(const Triple &T, StringRef ABIName) { bool is64Bit = T.isPPC64(); std::string Ret; @@ -228,7 +228,8 @@ static std::string computePowerDataLayout(const Triple &T) { // If the target ABI uses function descriptors, then the alignment of function // pointers depends on the alignment used to emit the descriptor. Otherwise, // function pointers are aligned to 32 bits because the instructions must be. - if ((T.getArch() == Triple::ppc64 && !T.isPPC64ELFv2ABI())) { + if ((T.getArch() == Triple::ppc64 && + (!T.isPPC64ELFv2ABI() && ABIName != "elfv2"))) { Ret += "-Fi64"; } else if (T.isOSAIX()) { Ret += is64Bit ? "-Fi64" : "-Fi32"; @@ -573,7 +574,7 @@ std::string Triple::computeDataLayout(StringRef ABIName) const { case Triple::ppcle: case Triple::ppc64: case Triple::ppc64le: - return computePowerDataLayout(*this); + return computePowerDataLayout(*this, ABIName); case Triple::r600: case Triple::amdgcn: return computeAMDDataLayout(*this); |
