[Alignment][NFC] Use Align with TargetLowering::setMinFunctionAlignment
[llvm-core.git] / include / llvm / XRay / RecordPrinter.h
blob7c7b7a32c56dc6c1a4e371c9aee0be7060ab41e2
1 //===- RecordPrinter.h - FDR Record Printer -------------------------------===//
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 // An implementation of the RecordVisitor which prints an individual record's
10 // data in an adhoc format, suitable for human inspection.
12 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_INCLUDE_LLVM_XRAY_RECORDPRINTER_H_
14 #define LLVM_INCLUDE_LLVM_XRAY_RECORDPRINTER_H_
16 #include "llvm/Support/raw_ostream.h"
17 #include "llvm/XRay/FDRRecords.h"
19 namespace llvm {
20 namespace xray {
22 class RecordPrinter : public RecordVisitor {
23 raw_ostream &OS;
24 std::string Delim;
26 public:
27 explicit RecordPrinter(raw_ostream &O, std::string D)
28 : RecordVisitor(), OS(O), Delim(std::move(D)) {}
30 explicit RecordPrinter(raw_ostream &O) : RecordPrinter(O, ""){};
32 Error visit(BufferExtents &) override;
33 Error visit(WallclockRecord &) override;
34 Error visit(NewCPUIDRecord &) override;
35 Error visit(TSCWrapRecord &) override;
36 Error visit(CustomEventRecord &) override;
37 Error visit(CallArgRecord &) override;
38 Error visit(PIDRecord &) override;
39 Error visit(NewBufferRecord &) override;
40 Error visit(EndBufferRecord &) override;
41 Error visit(FunctionRecord &) override;
42 Error visit(CustomEventRecordV5 &) override;
43 Error visit(TypedEventRecord &) override;
46 } // namespace xray
47 } // namespace llvm
49 #endif // LLVM_INCLUDE_LLVM_XRAY_RECORDPRINTER_H