diff options
author | Devang Patel <dpatel@apple.com> | 2009-09-03 01:38:02 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-09-03 01:38:02 +0000 |
commit | c0ff8c85dcc0bb3c58c15890b180dedaa726cb76 (patch) | |
tree | 5c52b11387b743a1aa880828c184f951c7d87b72 /lib/Bitcode | |
parent | 7096395d0290e2080c413a65fb7a600c1c132d11 (diff) |
Add new value for given index in MDValuePtrs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80867 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode')
-rw-r--r-- | lib/Bitcode/Reader/BitcodeReader.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index e0b5fd90c2..9ed75ab131 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/lib/Bitcode/Reader/BitcodeReader.cpp @@ -332,6 +332,9 @@ void BitcodeReaderMDValueList::AssignValue(Value *V, unsigned Idx) { Value *PrevVal = OldV; OldV->replaceAllUsesWith(V); delete PrevVal; + // Deleting PrevVal sets Idx value in MDValuePtrs to null. Set new + // value for Idx. + MDValuePtrs[Idx] = V; } Value *BitcodeReaderMDValueList::getValueFwdRef(unsigned Idx) { |