mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
For PR1146:
Make ParamAttrsList objects unique. You can no longer directly create or destroy them but instead must go through the ParamAttrsList::get() interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36327 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1078,16 +1078,18 @@ const Type *BytecodeReader::ParseType() {
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user