diff options
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r-- | clang/lib/Basic/Targets/PPC.h | 11 | ||||
-rw-r--r-- | clang/lib/Basic/Targets/SystemZ.h | 2 | ||||
-rw-r--r-- | clang/lib/Basic/Targets/X86.h | 2 |
3 files changed, 9 insertions, 6 deletions
diff --git a/clang/lib/Basic/Targets/PPC.h b/clang/lib/Basic/Targets/PPC.h index 85d898cda24..6e5df097921 100644 --- a/clang/lib/Basic/Targets/PPC.h +++ b/clang/lib/Basic/Targets/PPC.h @@ -314,11 +314,14 @@ public: bool hasSjLjLowering() const override { return true; } - bool useFloat128ManglingForLongDouble() const override { - return LongDoubleWidth == 128 && - LongDoubleFormat == &llvm::APFloat::PPCDoubleDouble() && - getTriple().isOSBinFormatELF(); + const char *getLongDoubleMangling() const override { + if (LongDoubleWidth == 64) + return "e"; + return LongDoubleFormat == &llvm::APFloat::PPCDoubleDouble() + ? "g" + : "u9__ieee128"; } + const char *getFloat128Mangling() const override { return "u9__ieee128"; } }; class LLVM_LIBRARY_VISIBILITY PPC32TargetInfo : public PPCTargetInfo { diff --git a/clang/lib/Basic/Targets/SystemZ.h b/clang/lib/Basic/Targets/SystemZ.h index 2aa1e3835ee..d25c6304ee7 100644 --- a/clang/lib/Basic/Targets/SystemZ.h +++ b/clang/lib/Basic/Targets/SystemZ.h @@ -141,7 +141,7 @@ public: return ""; } - bool useFloat128ManglingForLongDouble() const override { return true; } + const char *getLongDoubleMangling() const override { return "g"; } }; } // namespace targets } // namespace clang diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h index e154bc461d4..892a481e2a7 100644 --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -848,7 +848,7 @@ public: LongDoubleFormat = &llvm::APFloat::IEEEquad(); } - bool useFloat128ManglingForLongDouble() const override { return true; } + const char *getLongDoubleMangling() const override { return "g"; } }; } // namespace targets } // namespace clang |