| Index: src/IceAssembler.h
|
| diff --git a/src/IceAssembler.h b/src/IceAssembler.h
|
| index d2e9578ffe2d2a613fff1b76e907f282d15a2263..d3111adcbe5e19a6fca055c150a78a85726b1613 100644
|
| --- a/src/IceAssembler.h
|
| +++ b/src/IceAssembler.h
|
| @@ -237,6 +237,9 @@ class Assembler {
|
| Assembler &operator=(const Assembler &) = delete;
|
|
|
| public:
|
| + using InternalRelocationList =
|
| + std::vector<std::pair<const IceString, const SizeT>>;
|
| +
|
| enum AssemblerKind {
|
| Asm_ARM32,
|
| Asm_MIPS32,
|
| @@ -323,12 +326,23 @@ public:
|
|
|
| AssemblerKind getKind() const { return Kind; }
|
|
|
| + void addRelocationAtCurrentPosition(const IceString &RelocName) {
|
| + if (!getPreliminary()) {
|
| + InternalRelocs.emplace_back(RelocName, getBufferSize());
|
| + }
|
| + }
|
| +
|
| + const InternalRelocationList &getInternalRelocations() const {
|
| + return InternalRelocs;
|
| + }
|
| +
|
| protected:
|
| explicit Assembler(AssemblerKind Kind)
|
| : Kind(Kind), Allocator(), Buffer(*this) {}
|
|
|
| private:
|
| const AssemblerKind Kind;
|
| + InternalRelocationList InternalRelocs;
|
|
|
| ArenaAllocator<32 * 1024> Allocator;
|
| /// FunctionName and IsInternal are transferred from the original Cfg object,
|
|
|