mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01: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. llvm-svn: 217397
This commit is contained in:
parent
f4c0500cb9
commit
082ca75fd6
@ -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