File tree 1 file changed +2
-6
lines changed
llvm/lib/Transforms/Instrumentation 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -410,8 +410,8 @@ class HWAddressSanitizer {
410
410
ShadowMapping Mapping;
411
411
412
412
Type *VoidTy = Type::getVoidTy(M.getContext());
413
- Type *IntptrTy;
414
- PointerType *PtrTy;
413
+ Type *IntptrTy = M.getDataLayout().getIntPtrType(M.getContext()) ;
414
+ PointerType *PtrTy = PointerType::getUnqual(M.getContext()) ;
415
415
Type *Int8Ty = Type::getInt8Ty(M.getContext());
416
416
Type *Int32Ty = Type::getInt32Ty(M.getContext());
417
417
Type *Int64Ty = Type::getInt64Ty(M.getContext());
@@ -594,8 +594,6 @@ void HWAddressSanitizer::createHwasanCtorComdat() {
594
594
// / inserts a call to __hwasan_init to the module's constructor list.
595
595
void HWAddressSanitizer::initializeModule () {
596
596
LLVM_DEBUG (dbgs () << " Init " << M.getName () << " \n " );
597
- auto &DL = M.getDataLayout ();
598
-
599
597
TargetTriple = Triple (M.getTargetTriple ());
600
598
601
599
// x86_64 currently has two modes:
@@ -613,8 +611,6 @@ void HWAddressSanitizer::initializeModule() {
613
611
614
612
C = &(M.getContext ());
615
613
IRBuilder<> IRB (*C);
616
- IntptrTy = IRB.getIntPtrTy (DL);
617
- PtrTy = IRB.getPtrTy ();
618
614
619
615
HwasanCtorFunction = nullptr ;
620
616
You can’t perform that action at this time.
0 commit comments