-
Notifications
You must be signed in to change notification settings - Fork 11
/
BrokerFacade.h
50 lines (37 loc) · 989 Bytes
/
BrokerFacade.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef LLVM_MCAD_BROKERFACADE_H
#define LLVM_MCAD_BROKERFACADE_H
#include <memory>
namespace llvm {
class Target;
class MCAsmInfo;
class MCContext;
class MCSubtargetInfo;
class MCInstrInfo;
class SourceMgr;
namespace mca {
class HWEventListener;
}
namespace mcad {
class Broker;
class MCAWorker;
// An interface that provides objects that might be needed
// to build a Broker. It's also the interface to register a
// Broker.
// This class is trivially-copyable
class BrokerFacade {
friend class MCAWorker;
MCAWorker &Worker;
explicit BrokerFacade(MCAWorker &W) : Worker(W) {}
public:
void setBroker(std::unique_ptr<Broker> &&B);
void registerListener(mca::HWEventListener *EL);
const Target &getTarget() const;
MCContext &getCtx() const;
const MCAsmInfo &getAsmInfo() const;
const MCInstrInfo &getInstrInfo() const;
const MCSubtargetInfo &getSTI() const;
llvm::SourceMgr &getSourceMgr() const;
};
} // end namespace mcad
} // end namespace llvm
#endif