Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Unified Diff: include/llvm/CodeGen/AsmPrinter.h

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/llvm/Bitcode/ReaderWriter.h ('k') | include/llvm/CodeGen/ISDOpcodes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/llvm/CodeGen/AsmPrinter.h
diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h
index 25b99a2c6976d2df578f49e4ae4e014ba77916a5..ccfba30a5f1aaa41c8ce4fab0ce1cb2bfeacbc53 100644
--- a/include/llvm/CodeGen/AsmPrinter.h
+++ b/include/llvm/CodeGen/AsmPrinter.h
@@ -248,6 +248,18 @@ public:
// Targets can, or in the case of EmitInstruction, must implement these to
// customize output.
+ // @LOCALMOD-START
+ /// UseReadOnlyJumpTables - true if JumpTableInfo must be in rodata.
+ virtual bool UseReadOnlyJumpTables() const { return false; }
+ /// GetTargetBasicBlockAlign - the target alignment for basic blocks.
+ virtual unsigned GetTargetBasicBlockAlign() const { return 0; }
+ /// GetTargetLabelAlign - Get optional alignment for TargetOpcode
+ /// labels E.g., EH_LABEL.
+ virtual unsigned GetTargetLabelAlign(const MachineInstr *MI) const {
+ return 0;
+ }
+ // @LOCALMOD-END
+
/// This virtual method can be overridden by targets that want to emit
/// something at the start of their file.
virtual void EmitStartOfAsmFile(Module &) {}
@@ -262,7 +274,12 @@ public:
/// Targets can override this to emit stuff after the last basic block in the
/// function.
- virtual void EmitFunctionBodyEnd() {}
+ virtual void EmitFunctionBodyEnd() {
+ // @LOCALMOD-START
+ unsigned NextFunctionAlignment = GetTargetBasicBlockAlign();
+ if (NextFunctionAlignment) EmitAlignment(NextFunctionAlignment);
+ // @LOCALMOD-END
+ }
/// Targets can override this to emit stuff at the end of a basic block.
virtual void EmitBasicBlockEnd(const MachineBasicBlock &MBB) {}
« no previous file with comments | « include/llvm/Bitcode/ReaderWriter.h ('k') | include/llvm/CodeGen/ISDOpcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698