@@ -143,9 +143,9 @@ void TypeSanitizer::initializeCallbacks(Module &M) {
143143 TysanCheck = cast<Function>(
144144 M.getOrInsertFunction (kTysanCheckName , Attr, IRB.getVoidTy (),
145145 IRB.getPtrTy (), // Pointer to data to be read.
146- OrdTy, // Size of the data in bytes.
146+ OrdTy, // Size of the data in bytes.
147147 IRB.getPtrTy (), // Pointer to type descriptor.
148- OrdTy // Flags.
148+ OrdTy // Flags.
149149 )
150150 .getCallee ());
151151
@@ -601,7 +601,7 @@ bool TypeSanitizer::instrumentWithShadowUpdate(
601601
602602 Value *ShadowDataInt = ConvertToShadowDataInt (IRB, Ptr, IntptrTy, PtrShift,
603603 ShadowBase, AppMemMask);
604- Type *Int8PtrPtrTy = IRB.getPtrTy ()-> getPointerTo ( );
604+ Type *Int8PtrPtrTy = PointerType::get ( IRB.getPtrTy (), 0 );
605605 Value *ShadowData =
606606 IRB.CreateIntToPtr (ShadowDataInt, Int8PtrPtrTy, " shadow.ptr" );
607607
@@ -637,8 +637,7 @@ bool TypeSanitizer::instrumentWithShadowUpdate(
637637 Constant *Flags =
638638 ConstantInt::get (OrdTy, (int )IsRead | (((int )IsWrite) << 1 ));
639639
640- Value *LoadedTD =
641- IRB.CreateLoad (IRB.getPtrTy (), ShadowData, " shadow.desc" );
640+ Value *LoadedTD = IRB.CreateLoad (IRB.getPtrTy (), ShadowData, " shadow.desc" );
642641 if (SanitizeFunction) {
643642 Value *BadTDCmp = IRB.CreateICmpNE (LoadedTD, TD, " bad.desc" );
644643 Instruction *BadTDTerm, *GoodTDTerm;
@@ -673,16 +672,16 @@ bool TypeSanitizer::instrumentWithShadowUpdate(
673672 Instruction *BadUTDTerm = SplitBlockAndInsertIfThen (
674673 NotAllUnkTD, BeforeSetType, false , UnlikelyBW);
675674 IRB.SetInsertPoint (BadUTDTerm);
676- IRB.CreateCall (TysanCheck, {IRB.CreateBitCast (Ptr, IRB.getPtrTy ()),
677- Size, (Value *)TD, (Value *)Flags});
675+ IRB.CreateCall (TysanCheck, {IRB.CreateBitCast (Ptr, IRB.getPtrTy ()), Size,
676+ (Value *)TD, (Value *)Flags});
678677
679678 IRB.SetInsertPoint (BeforeSetType);
680679 SetType ();
681680
682681 // We have a non-trivial mismatch. Call the runtime.
683682 IRB.SetInsertPoint (MismatchTerm);
684- IRB.CreateCall (TysanCheck, {IRB.CreateBitCast (Ptr, IRB.getPtrTy ()),
685- Size, (Value *)TD, (Value *)Flags});
683+ IRB.CreateCall (TysanCheck, {IRB.CreateBitCast (Ptr, IRB.getPtrTy ()), Size,
684+ (Value *)TD, (Value *)Flags});
686685
687686 // We appear to have the right type. Make sure that all other bytes in
688687 // the type are still marked as interior bytes. If not, call the runtime.
@@ -703,8 +702,8 @@ bool TypeSanitizer::instrumentWithShadowUpdate(
703702 Instruction *BadITDTerm = SplitBlockAndInsertIfThen (
704703 NotAllBadTD, &*IRB.GetInsertPoint (), false , UnlikelyBW);
705704 IRB.SetInsertPoint (BadITDTerm);
706- IRB.CreateCall (TysanCheck, {IRB.CreateBitCast (Ptr, IRB.getPtrTy ()),
707- Size, (Value *)TD, (Value *)Flags});
705+ IRB.CreateCall (TysanCheck, {IRB.CreateBitCast (Ptr, IRB.getPtrTy ()), Size,
706+ (Value *)TD, (Value *)Flags});
708707 } else {
709708 // If we're not sanitizing this function, then we only care whether we
710709 // need to *set* the type.
@@ -843,8 +842,7 @@ bool TypeSanitizer::instrumentMemInst(Value *V, Value *&ShadowBase,
843842 IRB.CreateAnd (IRB.CreatePtrToInt (Src, IntptrTy), AppMemMask),
844843 PtrShift),
845844 ShadowBase);
846- Value *SrcShadowData =
847- IRB.CreateIntToPtr (SrcShadowDataInt, IRB.getPtrTy ());
845+ Value *SrcShadowData = IRB.CreateIntToPtr (SrcShadowDataInt, IRB.getPtrTy ());
848846
849847 if (NeedsMemMove) {
850848 IRB.CreateMemMove (ShadowData, Align (1u << PtrShift), SrcShadowData,
0 commit comments