aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Mayer <fmayer@google.com>2024-03-07 15:41:12 -0800
committerGitHub <noreply@github.com>2024-03-07 15:41:12 -0800
commit3e5afba8ef9319956d288ff755df3c442433eb88 (patch)
treed24ed134bb48731189fe4d2511f691ffecfa4824
parenta01e9ce86f4c1bc9af819902db9f287b6d23f54f (diff)
downloadllvm-3e5afba8ef9319956d288ff755df3c442433eb88.zip
llvm-3e5afba8ef9319956d288ff755df3c442433eb88.tar.gz
llvm-3e5afba8ef9319956d288ff755df3c442433eb88.tar.bz2
[NFC] [hwasan] be consistent about how to get integer types (#84396)
-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;