OSDN Git Service

Fix UBSan error reports in ValueMapCallbackVH and AssertingVH<T> empty/tombstone...
authorAlexey Samsonov <vonosmas@gmail.com>
Fri, 9 Jan 2015 23:17:25 +0000 (23:17 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Fri, 9 Jan 2015 23:17:25 +0000 (23:17 +0000)
commitf79e2d40b278bf9d1f52dcb46035fc7aa453639f
treedc858b94595dbadaf7a1eb6db2795ee5d533d989
parent43cc8a5fd15edabeaea6580dce0c1409d3be3613
Fix UBSan error reports in ValueMapCallbackVH and AssertingVH<T> empty/tombstone keys generation.

Summary:
One more attempt to fix UBSan reports: make sure DenseMapInfo::getEmptyKey()
and DenseMapInfo::getTombstoneKey() doesn't do any upcasts/downcasts to/from Value*.

Test Plan: check-llvm test suite with/without UBSan bootstrap

Reviewers: chandlerc, dexonsmith

Subscribers: llvm-commits, majnemer

Differential Revision: http://reviews.llvm.org/D6903

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225558 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/ValueHandle.h
include/llvm/IR/ValueMap.h