1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00

[MCAssembler] Allow backend to finalize layout post-relaxation.

Differential revision: http://reviews.llvm.org/D19429

llvm-svn: 267796
This commit is contained in:
Colin LeMahieu 2016-04-27 21:26:13 +00:00
parent 724ca3e5db
commit 3a95556e63
2 changed files with 5 additions and 0 deletions

View File

@ -126,6 +126,10 @@ public:
/// \return - True on success.
virtual bool writeNopData(uint64_t Count, MCObjectWriter *OW) const = 0;
/// Give backend an opportunity to finish layout after relaxation
virtual void finishLayout(MCAssembler const &Asm,
MCAsmLayout &Layout) const {}
/// Handle any target-specific assembler flags. By default, do nothing.
virtual void handleAssemblerFlag(MCAssemblerFlag Flag) {}

View File

@ -914,4 +914,5 @@ void MCAssembler::finishLayout(MCAsmLayout &Layout) {
for (unsigned int i = 0, n = Layout.getSectionOrder().size(); i != n; ++i) {
Layout.getFragmentOffset(&*Layout.getSectionOrder()[i]->rbegin());
}
getBackend().finishLayout(*this, Layout);
}