Skip to content

Commit bffc0b6

Browse files
authored
[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.
1 parent 4b077ed commit bffc0b6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/Target/RISCV/RISCVSubtarget.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ class RISCVSubtarget : public RISCVGenSubtargetInfo {
254254
const LegalizerInfo *getLegalizerInfo() const override;
255255
const RegisterBankInfo *getRegBankInfo() const override;
256256

257+
bool isTargetAndroid() const { return getTargetTriple().isAndroid(); }
257258
bool isTargetFuchsia() const { return getTargetTriple().isOSFuchsia(); }
258259

259260
bool useConstantPoolForLargeInts() const;

0 commit comments

Comments
 (0)