diff options
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 d765d9c..d735923 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); | 
