[llvm] d3c37e2 - [NFC][HWASAN] Use pointercast instead of bitcast

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 29 17:56:55 PDT 2023


Author: Vitaly Buka
Date: 2023-04-29T17:51:19-07:00
New Revision: d3c37e2cd143e67f6344a23f1cd509a8896d4b4b

URL: https://github.com/llvm/llvm-project/commit/d3c37e2cd143e67f6344a23f1cd509a8896d4b4b
DIFF: https://github.com/llvm/llvm-project/commit/d3c37e2cd143e67f6344a23f1cd509a8896d4b4b.diff

LOG: [NFC][HWASAN] Use pointercast instead of bitcast

Added: 
    

Modified: 
    llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
index 9708bf700dfb..d377fe502153 100644
--- a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
@@ -1010,7 +1010,7 @@ void HWAddressSanitizer::tagAlloca(IRBuilder<> &IRB, AllocaInst *AI, Value *Tag,
       IRB.CreateStore(ConstantInt::get(Int8Ty, SizeRemainder),
                       IRB.CreateConstGEP1_32(Int8Ty, ShadowPtr, ShadowSize));
       IRB.CreateStore(JustTag, IRB.CreateConstGEP1_32(
-                                   Int8Ty, IRB.CreateBitCast(AI, Int8PtrTy),
+                                   Int8Ty, IRB.CreatePointerCast(AI, Int8PtrTy),
                                    AlignedSize - 1));
     }
   }


        


More information about the llvm-commits mailing list