mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-19 04:26:05 +00:00
add writer support for param attrs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36724 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
#include "llvm/DerivedTypes.h"
|
#include "llvm/DerivedTypes.h"
|
||||||
#include "llvm/Instructions.h"
|
#include "llvm/Instructions.h"
|
||||||
#include "llvm/Module.h"
|
#include "llvm/Module.h"
|
||||||
|
#include "llvm/ParameterAttributes.h"
|
||||||
#include "llvm/TypeSymbolTable.h"
|
#include "llvm/TypeSymbolTable.h"
|
||||||
#include "llvm/ValueSymbolTable.h"
|
#include "llvm/ValueSymbolTable.h"
|
||||||
#include "llvm/Support/MathExtras.h"
|
#include "llvm/Support/MathExtras.h"
|
||||||
@@ -86,8 +87,21 @@ static void WriteParamAttrTable(const ValueEnumerator &VE,
|
|||||||
const std::vector<const ParamAttrsList*> &Attrs = VE.getParamAttrs();
|
const std::vector<const ParamAttrsList*> &Attrs = VE.getParamAttrs();
|
||||||
if (Attrs.empty()) return;
|
if (Attrs.empty()) return;
|
||||||
|
|
||||||
|
Stream.EnterSubblock(bitc::PARAMATTR_BLOCK_ID, 3);
|
||||||
|
|
||||||
|
SmallVector<uint64_t, 64> Record;
|
||||||
|
for (unsigned i = 0, e = Attrs.size(); i != e; ++i) {
|
||||||
|
const ParamAttrsList *A = Attrs[i];
|
||||||
|
for (unsigned op = 0, e = A->size(); op != e; ++op) {
|
||||||
|
Record.push_back(A->getParamIndex(op));
|
||||||
|
Record.push_back(A->getParamAttrs(op));
|
||||||
|
}
|
||||||
|
|
||||||
|
Stream.EmitRecord(bitc::PARAMATTR_CODE_ENTRY, Record);
|
||||||
|
Record.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
Stream.ExitBlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// WriteTypeTable - Write out the type table for a module.
|
/// WriteTypeTable - Write out the type table for a module.
|
||||||
|
Reference in New Issue
Block a user