diff options
| author | Hal Finkel <hfinkel@anl.gov> | 2014-09-08 19:31:25 +0000 |
|---|---|---|
| committer | Hal Finkel <hfinkel@anl.gov> | 2014-09-08 19:31:25 +0000 |
| commit | 337fa6e6458f8a6466e751e9c95bc266cbbeb9e2 (patch) | |
| tree | 2fbe924e132fd01330d94d22252afb9dcc0d4411 | |
| parent | 000c496f65d4cd1015373134c1bda4bece551832 (diff) | |
| download | bcm5719-llvm-337fa6e6458f8a6466e751e9c95bc266cbbeb9e2.tar.gz bcm5719-llvm-337fa6e6458f8a6466e751e9c95bc266cbbeb9e2.zip | |
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
| -rw-r--r-- | llvm/include/llvm/Analysis/AssumptionTracker.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/include/llvm/Analysis/AssumptionTracker.h b/llvm/include/llvm/Analysis/AssumptionTracker.h index 5e09b0ac654..80ae513f4f9 100644 --- a/llvm/include/llvm/Analysis/AssumptionTracker.h +++ b/llvm/include/llvm/Analysis/AssumptionTracker.h @@ -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); } |

