aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-10-14 13:18:04 +0200
committerGitHub <noreply@github.com>2024-10-14 11:18:04 +0000
commit387b37af1aabf325e9be844361564dfad8d45c75 (patch)
treeff5468341f527e4de397edeab44190e5c71c1efd /clang/lib/CodeGen/CodeGenModule.cpp
parentf7788618dd24e5366709a70c3e16cd5a0ca0a173 (diff)
downloadllvm-387b37af1aabf325e9be844361564dfad8d45c75.zip
llvm-387b37af1aabf325e9be844361564dfad8d45c75.tar.gz
llvm-387b37af1aabf325e9be844361564dfad8d45c75.tar.bz2
[LLVM] [Clang] Support for Gentoo `*t64` triples (64-bit time_t ABIs) (#111302)
Gentoo is planning to introduce a `*t64` suffix for triples that will be used by 32-bit platforms that use 64-bit `time_t`. Add support for parsing and accepting these triples, and while at it make clang automatically enable the necessary glibc feature macros when this suffix is used. An open question is whether we can backport this to LLVM 19.x. After all, adding new triplets to Triple sounds like an ABI change — though I suppose we can minimize the risk of breaking something if we move new enum values to the very end.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 7a7dea4..7f0e0de 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -175,10 +175,7 @@ createTargetCodeGenInfo(CodeGenModule &CGM) {
else if (ABIStr == "aapcs16")
Kind = ARMABIKind::AAPCS16_VFP;
else if (CodeGenOpts.FloatABI == "hard" ||
- (CodeGenOpts.FloatABI != "soft" &&
- (Triple.getEnvironment() == llvm::Triple::GNUEABIHF ||
- Triple.getEnvironment() == llvm::Triple::MuslEABIHF ||
- Triple.getEnvironment() == llvm::Triple::EABIHF)))
+ (CodeGenOpts.FloatABI != "soft" && Triple.isHardFloatABI()))
Kind = ARMABIKind::AAPCS_VFP;
return createARMTargetCodeGenInfo(CGM, Kind);