[PATCH] D19429: Give backends an opportunity to finish layout post-relaxation

Colin LeMahieu via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 14:32:07 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL267796: [MCAssembler] Allow backend to finalize layout post-relaxation. (authored by colinl).

Changed prior to commit:
  http://reviews.llvm.org/D19429?vs=54699&id=55322#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D19429

Files:
  llvm/trunk/include/llvm/MC/MCAsmBackend.h
  llvm/trunk/lib/MC/MCAssembler.cpp

Index: llvm/trunk/lib/MC/MCAssembler.cpp
===================================================================
--- llvm/trunk/lib/MC/MCAssembler.cpp
+++ llvm/trunk/lib/MC/MCAssembler.cpp
@@ -914,4 +914,5 @@
   for (unsigned int i = 0, n = Layout.getSectionOrder().size(); i != n; ++i) {
     Layout.getFragmentOffset(&*Layout.getSectionOrder()[i]->rbegin());
   }
+  getBackend().finishLayout(*this, Layout);
 }
Index: llvm/trunk/include/llvm/MC/MCAsmBackend.h
===================================================================
--- llvm/trunk/include/llvm/MC/MCAsmBackend.h
+++ llvm/trunk/include/llvm/MC/MCAsmBackend.h
@@ -126,6 +126,10 @@
   /// \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) {}
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19429.55322.patch
Type: text/x-patch
Size: 1073 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160427/6ab7a1a3/attachment.bin>


More information about the llvm-commits mailing list