1 //===- X86AsmInstrumentation.h - Instrument X86 inline assembly *- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef X86_ASM_INSTRUMENTATION_H
11 #define X86_ASM_INSTRUMENTATION_H
13 #include "llvm/ADT/SmallVector.h"
19 class MCParsedAsmOperand;
21 class MCSubtargetInfo;
22 class MCTargetOptions;
24 class X86AsmInstrumentation;
26 X86AsmInstrumentation *
27 CreateX86AsmInstrumentation(const MCTargetOptions &MCOptions,
28 const MCContext &Ctx, const MCSubtargetInfo &STI);
30 class X86AsmInstrumentation {
32 virtual ~X86AsmInstrumentation();
34 // Instruments Inst. Should be called just before the original
35 // instruction is sent to Out.
36 virtual void InstrumentInstruction(
37 const MCInst &Inst, SmallVectorImpl<MCParsedAsmOperand *> &Operands,
38 MCContext &Ctx, MCStreamer &Out);
41 friend X86AsmInstrumentation *
42 CreateX86AsmInstrumentation(const MCTargetOptions &MCOptions,
43 const MCContext &Ctx, const MCSubtargetInfo &STI);
45 X86AsmInstrumentation();
48 } // End llvm namespace
50 #endif // X86_ASM_INSTRUMENTATION_H