[llvm] [NFC] [HWASan] make getAndroidSlotPtr function generic (PR #86200)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 26 13:23:07 PDT 2024
================
@@ -273,14 +273,14 @@ Value *getFP(IRBuilder<> &IRB) {
IRB.getIntPtrTy(M->getDataLayout()));
}
-Value *getAndroidSanitizerSlotPtr(IRBuilder<> &IRB) {
+Value *getAndroidSlotPtr(IRBuilder<> &IRB, int Slot) {
Module *M = IRB.GetInsertBlock()->getParent()->getParent();
// Android provides a fixed TLS slot for sanitizers. See TLS_SLOT_SANITIZER
// in Bionic's libc/private/bionic_tls.h.
Function *ThreadPointerFunc =
Intrinsic::getDeclaration(M, Intrinsic::thread_pointer);
return IRB.CreateConstGEP1_32(IRB.getInt8Ty(),
----------------
vitalybuka wrote:
would be better to use `IRB.getIntPtrTy()` and avoid `8*` ?
https://github.com/llvm/llvm-project/pull/86200
More information about the llvm-commits
mailing list