[llvm] bffc0b6 - [RISCV][NFC] Add isTargetAndroid API in RISCVSubtarget (#87671)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 4 15:22:03 PDT 2024
Author: Paul Kirth
Date: 2024-04-04T15:21:59-07:00
New Revision: bffc0b65692596137cbdcdd3b48e2f31320dacbd
URL: https://github.com/llvm/llvm-project/commit/bffc0b65692596137cbdcdd3b48e2f31320dacbd
DIFF: https://github.com/llvm/llvm-project/commit/bffc0b65692596137cbdcdd3b48e2f31320dacbd.diff
LOG: [RISCV][NFC] Add isTargetAndroid API in RISCVSubtarget (#87671)
This is required to set target specific code generation options for
Android,
like using the TLS slot for the stack protector.
Added:
Modified:
llvm/lib/Target/RISCV/RISCVSubtarget.h
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVSubtarget.h b/llvm/lib/Target/RISCV/RISCVSubtarget.h
index ba108912d93400..85f8f5f654fe7c 100644
--- a/llvm/lib/Target/RISCV/RISCVSubtarget.h
+++ b/llvm/lib/Target/RISCV/RISCVSubtarget.h
@@ -254,6 +254,7 @@ class RISCVSubtarget : public RISCVGenSubtargetInfo {
const LegalizerInfo *getLegalizerInfo() const override;
const RegisterBankInfo *getRegBankInfo() const override;
+ bool isTargetAndroid() const { return getTargetTriple().isAndroid(); }
bool isTargetFuchsia() const { return getTargetTriple().isOSFuchsia(); }
bool useConstantPoolForLargeInts() const;
More information about the llvm-commits
mailing list