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;
23 class X86AsmInstrumentation;
25 X86AsmInstrumentation *CreateX86AsmInstrumentation(MCSubtargetInfo &STI);
27 class X86AsmInstrumentation {
29 virtual ~X86AsmInstrumentation();
31 // Instruments Inst. Should be called just before the original
32 // instruction is sent to Out.
33 virtual void InstrumentInstruction(
34 const MCInst &Inst, SmallVectorImpl<MCParsedAsmOperand *> &Operands,
35 MCContext &Ctx, MCStreamer &Out);
38 friend X86AsmInstrumentation *
39 CreateX86AsmInstrumentation(MCSubtargetInfo &STI);
41 X86AsmInstrumentation();
44 } // End llvm namespace
46 #endif // X86_ASM_INSTRUMENTATION_H