mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-08 03:30:22 +00:00
Don't static_cast invalid pointers
UBSan complained about using static_cast on the invalid (tombstone, etc.) pointers used by DenseMap. Use a reinterpret_cast instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217397 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e769dc39fd
commit
beeca54864
@ -66,7 +66,7 @@ class AssumptionTracker : public ImmutablePass {
|
||||
operator CallInst*() const {
|
||||
Value *V = getValPtr();
|
||||
if (V == DMI::getEmptyKey() || V == DMI::getTombstoneKey())
|
||||
return static_cast<CallInst*>(V);
|
||||
return reinterpret_cast<CallInst*>(V);
|
||||
|
||||
return cast<CallInst>(V);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user