mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 23:18:58 +00:00
Fix PR215: [bcwriter] Problem compactifying ConstantPointerRefs
Have I ever mentioned how much I _hate_ constantpointerrefs? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11212 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b9806e0101
commit
71151aee60
@ -381,6 +381,8 @@ static inline bool hasNullValue(unsigned TyID) {
|
||||
/// getOrCreateCompactionTableSlot - This method is used to build up the initial
|
||||
/// approximation of the compaction table.
|
||||
unsigned SlotCalculator::getOrCreateCompactionTableSlot(const Value *V) {
|
||||
if (const ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(V))
|
||||
V = CPR->getValue();
|
||||
std::map<const Value*, unsigned>::iterator I =
|
||||
CompactionNodeMap.lower_bound(V);
|
||||
if (I != CompactionNodeMap.end() && I->first == V)
|
||||
|
@ -381,6 +381,8 @@ static inline bool hasNullValue(unsigned TyID) {
|
||||
/// getOrCreateCompactionTableSlot - This method is used to build up the initial
|
||||
/// approximation of the compaction table.
|
||||
unsigned SlotCalculator::getOrCreateCompactionTableSlot(const Value *V) {
|
||||
if (const ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(V))
|
||||
V = CPR->getValue();
|
||||
std::map<const Value*, unsigned>::iterator I =
|
||||
CompactionNodeMap.lower_bound(V);
|
||||
if (I != CompactionNodeMap.end() && I->first == V)
|
||||
|
Loading…
Reference in New Issue
Block a user