Index: src/assembler.cpp |
diff --git a/src/assembler.cpp b/src/assembler.cpp |
index b0bd297f057db71e178e6307261781ab9750b0d3..a9516e869b05a0213e96557245d9ef270f513493 100644 |
--- a/src/assembler.cpp |
+++ b/src/assembler.cpp |
@@ -20,7 +20,6 @@ |
#include "assembler.h" |
#include "IceGlobalContext.h" |
-#include "IceMemoryRegion.h" |
#include "IceOperand.h" |
namespace Ice { |
@@ -76,25 +75,6 @@ AssemblerBuffer::AssemblerBuffer(Assembler &assembler) : assembler_(assembler) { |
AssemblerBuffer::~AssemblerBuffer() {} |
-void AssemblerBuffer::ProcessFixups(const MemoryRegion ®ion) { |
- for (SizeT I = 0; I < fixups_.size(); ++I) { |
- AssemblerFixup *fixup = fixups_[I]; |
- fixup->Process(region, fixup->position()); |
- } |
-} |
- |
-void AssemblerBuffer::FinalizeInstructions(const MemoryRegion &instructions) { |
- // Copy the instructions from the buffer. |
- MemoryRegion from(reinterpret_cast<void *>(contents()), Size()); |
- instructions.CopyFrom(0, from); |
- |
- // Process fixups in the instructions. |
- ProcessFixups(instructions); |
-#ifndef NDEBUG |
- fixups_processed_ = true; |
-#endif // !NDEBUG |
-} |
- |
void AssemblerBuffer::ExtendCapacity() { |
intptr_t old_size = Size(); |
intptr_t old_capacity = Capacity(); |
@@ -123,6 +103,11 @@ void AssemblerBuffer::ExtendCapacity() { |
assert(Size() == old_size); |
} |
+llvm::StringRef Assembler::getBufferView() const { |
+ return llvm::StringRef(reinterpret_cast<const char *>(buffer_.contents()), |
+ buffer_.Size()); |
+} |
+ |
void Assembler::emitIASBytes(GlobalContext *Ctx) const { |
Ostream &Str = Ctx->getStrEmit(); |
intptr_t EndPosition = buffer_.Size(); |