xref: /llvm-project/bolt/include/bolt/Passes/AsmDump.h (revision a5f3d1a803020167bd9d494a8a3921e7dcc1550a)
1 //===- bolt/Passes/AsmDump.h - Dump BinaryFunction as assembly --*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // BinaryPass to dump BinaryFunction state (CFG, profile data, jump tables,
10 // CFI state) as assembly.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef BOLT_PASSES_ASMDUMP_H
15 #define BOLT_PASSES_ASMDUMP_H
16 
17 #include "bolt/Passes/BinaryPasses.h"
18 
19 namespace llvm {
20 namespace bolt {
21 
22 class AsmDumpPass : public BinaryFunctionPass {
23 public:
AsmDumpPass()24   explicit AsmDumpPass() : BinaryFunctionPass(false) {}
25 
getName()26   const char *getName() const override { return "asm-dump"; }
27 
shouldPrint(const BinaryFunction & BF)28   bool shouldPrint(const BinaryFunction &BF) const override { return false; }
29 
30   /// Pass entry point
31   Error runOnFunctions(BinaryContext &BC) override;
32 };
33 
34 } // namespace bolt
35 } // namespace llvm
36 
37 #endif
38