xref: /freebsd-11-stable/contrib/llvm-project/llvm/tools/llvm-mca/Views/View.h (revision 8ce8be0a003b95ab7796df15e97ca5944b8536ac)
1 //===----------------------- View.h -----------------------------*- 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 /// \file
9 ///
10 /// This file defines the main interface for Views. Each view contributes a
11 /// portion of the final report generated by the tool.
12 ///
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_TOOLS_LLVM_MCA_VIEW_H
16 #define LLVM_TOOLS_LLVM_MCA_VIEW_H
17 
18 #include "llvm/MCA/HWEventListener.h"
19 #include "llvm/Support/raw_ostream.h"
20 
21 namespace llvm {
22 namespace mca {
23 
24 class View : public HWEventListener {
25 public:
26   virtual void printView(llvm::raw_ostream &OS) const = 0;
27   virtual ~View() = default;
28   void anchor() override;
29 };
30 } // namespace mca
31 } // namespace llvm
32 
33 #endif
34