Remove all local variables from X86SelectionDAGInfo, the DAG has
[oota-llvm.git] / lib / Target / X86 / AsmParser / X86AsmInstrumentation.h
1 //===- X86AsmInstrumentation.h - Instrument X86 inline assembly *- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef X86_ASM_INSTRUMENTATION_H
11 #define X86_ASM_INSTRUMENTATION_H
12
13 #include "llvm/ADT/SmallVector.h"
14
15 namespace llvm {
16
17 class MCContext;
18 class MCInst;
19 class MCInstrInfo;
20 class MCParsedAsmOperand;
21 class MCStreamer;
22 class MCSubtargetInfo;
23 class MCTargetOptions;
24
25 class X86AsmInstrumentation;
26
27 X86AsmInstrumentation *
28 CreateX86AsmInstrumentation(const MCTargetOptions &MCOptions,
29                             const MCContext &Ctx, const MCSubtargetInfo &STI);
30
31 class X86AsmInstrumentation {
32 public:
33   virtual ~X86AsmInstrumentation();
34
35   // Instruments Inst. Should be called just before the original
36   // instruction is sent to Out.
37   virtual void InstrumentInstruction(
38       const MCInst &Inst, SmallVectorImpl<MCParsedAsmOperand *> &Operands,
39       MCContext &Ctx,
40       const MCInstrInfo &MII,
41       MCStreamer &Out);
42
43 protected:
44   friend X86AsmInstrumentation *
45   CreateX86AsmInstrumentation(const MCTargetOptions &MCOptions,
46                               const MCContext &Ctx, const MCSubtargetInfo &STI);
47
48   X86AsmInstrumentation();
49 };
50
51 } // End llvm namespace
52
53 #endif // X86_ASM_INSTRUMENTATION_H