aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Mayer <fmayer@google.com>2024-03-07 15:17:51 -0800
committerFlorian Mayer <fmayer@google.com>2024-03-07 15:17:51 -0800
commit66bffabbe90ee44aa905f7bf445f21a8e3d222e8 (patch)
tree8fc98cafb9e375beef98823192dc4459df7b5f4f
parent11185715a28c6592ca6fe247fe693b305c85627a (diff)
downloadllvm-users/fmayer/sprmain.nfc-hwasan-also-be-more-consistent-when-getting-pointer-types.zip
llvm-users/fmayer/sprmain.nfc-hwasan-also-be-more-consistent-when-getting-pointer-types.tar.gz
llvm-users/fmayer/sprmain.nfc-hwasan-also-be-more-consistent-when-getting-pointer-types.tar.bz2
Created using spr 1.3.4 [skip ci]
-rw-r--r--llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
index 236ee89..289183e 100644
--- a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
@@ -412,8 +412,8 @@ private:
Type *VoidTy = Type::getVoidTy(M.getContext());
Type *IntptrTy;
PointerType *PtrTy;
- Type *Int8Ty;
- Type *Int32Ty;
+ Type *Int8Ty = Type::getInt8Ty(M.getContext());
+ Type *Int32Ty = Type::getInt32Ty(M.getContext());
Type *Int64Ty = Type::getInt64Ty(M.getContext());
bool CompileKernel;
@@ -615,8 +615,6 @@ void HWAddressSanitizer::initializeModule() {
IRBuilder<> IRB(*C);
IntptrTy = IRB.getIntPtrTy(DL);
PtrTy = IRB.getPtrTy();
- Int8Ty = IRB.getInt8Ty();
- Int32Ty = IRB.getInt32Ty();
HwasanCtorFunction = nullptr;