LLVM  8.0.1
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/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.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/TargetMachine.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 293 of file AsmPrinterInlineAsm.cpp.

References llvm::InlineAsm::AD_ATT, assert(), llvm::SourceMgr::DK_Note, llvm::SourceMgr::DK_Warning, E, llvm::LLVMContext::emitError(), EmitMSInlineAsmStr(), llvm::StringRef::getAsInteger(), llvm::MCAsmInfo::getAssemblerDialect(), llvm::Module::getContext(), llvm::SMLoc::getFromPointer(), llvm::MachineFunction::getFunction(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getInlineAsmDialect(), llvm::MCAsmInfo::getInlineAsmEnd(), llvm::MCAsmInfo::getInlineAsmStart(), llvm::InlineAsm::getKind(), llvm::MachineOperand::getMBB(), llvm::MachineOperand::getMetadata(), llvm::MachineModuleInfo::getModule(), llvm::MCRegisterInfo::getName(), llvm::InlineAsm::getNumOperandRegisters(), llvm::MachineInstr::getNumOperands(), llvm::MDNode::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MDNode::getOperand(), llvm::MachineOperand::getReg(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), llvm::AsmPrinter::getSubtargetInfo(), llvm::MachineBasicBlock::getSymbol(), llvm::MachineOperand::getSymbolName(), llvm::Function::hasFnAttribute(), I, llvm::TargetRegisterInfo::isAsmClobberable(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isImm(), llvm::MachineInstr::isInlineAsm(), llvm::InlineAsm::isMemKind(), llvm::MachineOperand::isMetadata(), llvm::MachineOperand::isReg(), llvm::MachineOperand::isSymbol(), llvm::InlineAsm::Kind_Clobber, llvm::AsmPrinter::MAI, llvm::TargetOptions::MCOptions, llvm::AsmPrinter::MF, MI, llvm::InlineAsm::MIOp_FirstOperand, llvm::AsmPrinter::MMI, llvm::Note, 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::Attribute::SanitizeAddress, llvm::SrcMgr, llvm::raw_string_ostream::str(), llvm::raw_svector_ostream::str(), llvm::AsmPrinter::TM, TRI, 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::AsmPrinter::EnablePrintSchedInfo, 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::MCContext::setInlineSourceManager(), llvm::StringRef::size(), llvm::SrcMgr, llvm::AsmPrinter::SrcMgrDiagInfo::SrcMgr, llvm::StringRef::substr(), llvm::AsmPrinter::TM, TRI, and llvm::MCAsmInfo::useIntegratedAssembler().