projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e769dc3
)
Don't static_cast invalid pointers
author
Hal Finkel
<hfinkel@anl.gov>
Mon, 8 Sep 2014 19:31:25 +0000
(19:31 +0000)
committer
Hal Finkel
<hfinkel@anl.gov>
Mon, 8 Sep 2014 19:31:25 +0000
(19:31 +0000)
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
include/llvm/Analysis/AssumptionTracker.h
patch
|
blob
|
history
diff --git
a/include/llvm/Analysis/AssumptionTracker.h
b/include/llvm/Analysis/AssumptionTracker.h
index 5e09b0ac6543eed165d2ee40aaf3505d2b495641..80ae513f4f93831f014a2887422f592ea35ff03f 100644
(file)
--- a/
include/llvm/Analysis/AssumptionTracker.h
+++ b/
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);
}