LLVM  6.0.0svn
Macros | Functions
AsmPrinterInlineAsm.cpp File Reference
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/Twine.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCParser/MCTargetAsmParser.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Target/TargetSubtargetInfo.h"
Include dependency graph for AsmPrinterInlineAsm.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "asm-printer"
 

Functions

static void srcMgrDiagHandler (const SMDiagnostic &Diag, void *diagInfo)
 srcMgrDiagHandler - This callback is invoked when the SourceMgr for an inline asm has an error in it. More...
 
static void EmitMSInlineAsmStr (const char *AsmStr, const MachineInstr *MI, MachineModuleInfo *MMI, int InlineAsmVariant, AsmPrinter *AP, unsigned LocCookie, raw_ostream &OS)
 
static void EmitGCCInlineAsmStr (const char *AsmStr, const MachineInstr *MI, MachineModuleInfo *MMI, int InlineAsmVariant, int AsmPrinterVariant, AsmPrinter *AP, unsigned LocCookie, raw_ostream &OS)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "asm-printer"

Definition at line 41 of file AsmPrinterInlineAsm.cpp.

Function Documentation

◆ EmitGCCInlineAsmStr()

static void EmitGCCInlineAsmStr ( const char AsmStr,
const MachineInstr MI,
MachineModuleInfo MMI,
int  InlineAsmVariant,
int  AsmPrinterVariant,
AsmPrinter AP,
unsigned  LocCookie,
raw_ostream OS 
)
static

Definition at line 280 of file AsmPrinterInlineAsm.cpp.

References llvm::InlineAsm::AD_ATT, assert(), llvm::LLVMContext::emitError(), EmitMSInlineAsmStr(), llvm::StringRef::getAsInteger(), llvm::MCAsmInfo::getAssemblerDialect(), llvm::Module::getContext(), llvm::MachineFunction::getFunction(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getInlineAsmDialect(), llvm::MCAsmInfo::getInlineAsmEnd(), llvm::MCAsmInfo::getInlineAsmStart(), llvm::MachineOperand::getMBB(), llvm::MachineOperand::getMetadata(), llvm::MachineModuleInfo::getModule(), llvm::InlineAsm::getNumOperandRegisters(), llvm::MachineInstr::getNumOperands(), llvm::MDNode::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MDNode::getOperand(), llvm::AsmPrinter::getSubtargetInfo(), llvm::MachineBasicBlock::getSymbol(), llvm::MachineOperand::getSymbolName(), llvm::Function::hasFnAttribute(), llvm::MachineOperand::isDef(), llvm::MachineInstr::isInlineAsm(), llvm::InlineAsm::isMemKind(), llvm::MachineOperand::isMetadata(), llvm::MachineOperand::isReg(), llvm::MachineOperand::isSymbol(), llvm::AsmPrinter::MAI, llvm::TargetOptions::MCOptions, llvm::AsmPrinter::MF, MI, llvm::InlineAsm::MIOp_FirstOperand, llvm::AsmPrinter::MMI, llvm::TargetMachine::Options, llvm::AsmPrinter::OutStreamer, llvm::MCSymbol::print(), llvm::AsmPrinter::PrintAsmMemoryOperand(), llvm::AsmPrinter::PrintAsmOperand(), llvm::AsmPrinter::PrintSpecial(), llvm::report_fatal_error(), llvm::MCTargetOptions::SanitizeAddress, llvm::raw_string_ostream::str(), llvm::raw_svector_ostream::str(), llvm::AsmPrinter::TM, and llvm::raw_ostream::write().

◆ EmitMSInlineAsmStr()

static void EmitMSInlineAsmStr ( const char AsmStr,
const MachineInstr MI,
MachineModuleInfo MMI,
int  InlineAsmVariant,
AsmPrinter AP,
unsigned  LocCookie,
raw_ostream OS 
)
static

◆ srcMgrDiagHandler()

static void srcMgrDiagHandler ( const SMDiagnostic Diag,
void *  diagInfo 
)
static

srcMgrDiagHandler - This callback is invoked when the SourceMgr for an inline asm has an error in it.

diagInfo is a pointer to the SrcMgrDiagInfo struct above.

Definition at line 46 of file AsmPrinterInlineAsm.cpp.

References llvm::InlineAsm::AD_Intel, llvm::SourceMgr::AddNewSourceBuffer(), assert(), llvm::StringRef::back(), Context, llvm::createMCAsmParser(), llvm::Target::createMCAsmParser(), llvm::Target::createMCInstrInfo(), llvm::AsmPrinter::SrcMgrDiagInfo::DiagContext, llvm::AsmPrinter::SrcMgrDiagInfo::DiagHandler, llvm::AsmPrinter::emitInlineAsmEnd(), llvm::AsmPrinter::emitInlineAsmStart(), llvm::StringRef::empty(), llvm::SourceMgr::FindBufferContainingLoc(), llvm::MachineModuleInfo::getContext(), llvm::Module::getContext(), llvm::TargetRegisterInfo::getFrameRegister(), llvm::LLVMContext::getInlineAsmDiagnosticContext(), llvm::LLVMContext::getInlineAsmDiagnosticHandler(), llvm::SMDiagnostic::getLineNo(), llvm::SMDiagnostic::getLoc(), llvm::TargetMachine::getMCAsmInfo(), llvm::MemoryBuffer::getMemBufferCopy(), llvm::MachineModuleInfo::getModule(), llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), llvm::TargetMachine::getTarget(), llvm::MCTargetOptions::IASSearchPaths, if(), llvm::AsmPrinter::SrcMgrDiagInfo::LocInfos, llvm::AsmPrinter::MAI, llvm::AsmPrinter::MF, llvm::AsmPrinter::MMI, llvm::AsmPrinter::OutContext, llvm::AsmPrinter::OutStreamer, llvm::report_fatal_error(), llvm::SourceMgr::setIncludeDirs(), llvm::MCContext::setInlineSourceManager(), llvm::StringRef::size(), llvm::SrcMgr, llvm::AsmPrinter::SrcMgrDiagInfo::SrcMgr, llvm::StringRef::substr(), llvm::AsmPrinter::TM, and llvm::MCAsmInfo::useIntegratedAssembler().