diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-02-09 00:15:41 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-02-09 00:15:41 +0000 |
| commit | 5b6892e37c8d138527d395bab22006e9b3c3427a (patch) | |
| tree | f0ae7776b53aad3301670af67c28cd305f21edb3 /llvm/lib/VMCore | |
| parent | 3480e935d05c0abc4da4a8f12fcf45fe9f66045a (diff) | |
| download | bcm5719-llvm-5b6892e37c8d138527d395bab22006e9b3c3427a.tar.gz bcm5719-llvm-5b6892e37c8d138527d395bab22006e9b3c3427a.zip | |
Fix PR215: [bcwriter] Problem compactifying ConstantPointerRefs
Have I ever mentioned how much I _hate_ constantpointerrefs?
llvm-svn: 11212
Diffstat (limited to 'llvm/lib/VMCore')
| -rw-r--r-- | llvm/lib/VMCore/SlotCalculator.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/SlotCalculator.cpp b/llvm/lib/VMCore/SlotCalculator.cpp index d928c083926..7b18a1dfd5a 100644 --- a/llvm/lib/VMCore/SlotCalculator.cpp +++ b/llvm/lib/VMCore/SlotCalculator.cpp @@ -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) |

