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"
20 class MCParsedAsmOperand;
22 class MCSubtargetInfo;
23 class MCTargetOptions;
25 class X86AsmInstrumentation;
27 X86AsmInstrumentation *
28 CreateX86AsmInstrumentation(const MCTargetOptions &MCOptions,
29 const MCContext &Ctx, const MCSubtargetInfo &STI);
31 class X86AsmInstrumentation {
33 virtual ~X86AsmInstrumentation();
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,
40 const MCInstrInfo &MII,
44 friend X86AsmInstrumentation *
45 CreateX86AsmInstrumentation(const MCTargetOptions &MCOptions,
46 const MCContext &Ctx, const MCSubtargetInfo &STI);
48 X86AsmInstrumentation();
51 } // End llvm namespace
53 #endif // X86_ASM_INSTRUMENTATION_H