[llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp
Reid Spencer
reid at x10sys.com
Sat Apr 21 22:47:23 PDT 2007
Changes in directory llvm/lib/Bytecode/Reader:
Reader.cpp updated: 1.250 -> 1.251
---
Log message:
For PR1146: http://llvm.org/PR1146 :
Make ParamAttrsList objects unique. You can no longer directly create or
destroy them but instead must go through the ParamAttrsList::get()
interface.
---
Diffs of the changes: (+8 -6)
Reader.cpp | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
Index: llvm/lib/Bytecode/Reader/Reader.cpp
diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.250 llvm/lib/Bytecode/Reader/Reader.cpp:1.251
--- llvm/lib/Bytecode/Reader/Reader.cpp:1.250 Sat Apr 21 13:36:27 2007
+++ llvm/lib/Bytecode/Reader/Reader.cpp Sun Apr 22 00:46:44 2007
@@ -1078,16 +1078,18 @@
ParamAttrsList *BytecodeReader::ParseParamAttrsList() {
unsigned NumAttrs = read_vbr_uint();
- ParamAttrsList *Attrs = 0;
+ ParamAttrsList *PAL = 0;
if (NumAttrs) {
- Attrs = new ParamAttrsList();
+ ParamAttrsVector Attrs;
+ ParamAttrsWithIndex PAWI;
while (NumAttrs--) {
- uint16_t index = read_vbr_uint();
- uint16_t attrs = read_vbr_uint();
- Attrs->addAttributes(index, attrs);
+ PAWI.index = read_vbr_uint();
+ PAWI.attrs = read_vbr_uint();
+ Attrs.push_back(PAWI);
}
+ PAL = ParamAttrsList::get(Attrs);
}
- return Attrs;
+ return PAL;
}
More information about the llvm-commits
mailing list