File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
llvm/lib/Transforms/Instrumentation Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -410,8 +410,8 @@ class HWAddressSanitizer {
410410 ShadowMapping Mapping;
411411
412412 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()) ;
415415 Type *Int8Ty = Type::getInt8Ty(M.getContext());
416416 Type *Int32Ty = Type::getInt32Ty(M.getContext());
417417 Type *Int64Ty = Type::getInt64Ty(M.getContext());
@@ -594,8 +594,6 @@ void HWAddressSanitizer::createHwasanCtorComdat() {
594594// / inserts a call to __hwasan_init to the module's constructor list.
595595void HWAddressSanitizer::initializeModule () {
596596 LLVM_DEBUG (dbgs () << " Init " << M.getName () << " \n " );
597- auto &DL = M.getDataLayout ();
598-
599597 TargetTriple = Triple (M.getTargetTriple ());
600598
601599 // x86_64 currently has two modes:
@@ -613,8 +611,6 @@ void HWAddressSanitizer::initializeModule() {
613611
614612 C = &(M.getContext ());
615613 IRBuilder<> IRB (*C);
616- IntptrTy = IRB.getIntPtrTy (DL);
617- PtrTy = IRB.getPtrTy ();
618614
619615 HwasanCtorFunction = nullptr ;
620616
You can’t perform that action at this time.
0 commit comments