LLVM 19.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::DiagnosticInfoInlineAsm Class Reference

Diagnostic information for inline asm reporting. More...

#include "llvm/IR/DiagnosticInfo.h"

Inheritance diagram for llvm::DiagnosticInfoInlineAsm:
Inheritance graph
[legend]

Public Member Functions

 DiagnosticInfoInlineAsm (const Twine &MsgStr, DiagnosticSeverity Severity=DS_Error)
 MsgStr is the message to be reported to the frontend.
 
 DiagnosticInfoInlineAsm (uint64_t LocCookie, const Twine &MsgStr, DiagnosticSeverity Severity=DS_Error)
 LocCookie if non-zero gives the line number for this report.
 
 DiagnosticInfoInlineAsm (const Instruction &I, const Twine &MsgStr, DiagnosticSeverity Severity=DS_Error)
 Instr gives the original instruction that triggered the diagnostic.
 
uint64_t getLocCookie () const
 
const TwinegetMsgStr () const
 
const InstructiongetInstruction () const
 
void print (DiagnosticPrinter &DP) const override
 
- Public Member Functions inherited from llvm::DiagnosticInfo
 DiagnosticInfo (int Kind, DiagnosticSeverity Severity)
 
virtual ~DiagnosticInfo ()=default
 
int getKind () const
 
DiagnosticSeverity getSeverity () const
 
virtual void print (DiagnosticPrinter &DP) const =0
 Print using the given DP a user-friendly message.
 

Static Public Member Functions

static bool classof (const DiagnosticInfo *DI)
 

Detailed Description

Diagnostic information for inline asm reporting.

This is basically a message and an optional location.

Definition at line 138 of file DiagnosticInfo.h.

Constructor & Destructor Documentation

◆ DiagnosticInfoInlineAsm() [1/3]

llvm::DiagnosticInfoInlineAsm::DiagnosticInfoInlineAsm ( const Twine MsgStr,
DiagnosticSeverity  Severity = DS_Error 
)
inline

MsgStr is the message to be reported to the frontend.

This class does not copy MsgStr, therefore the reference must be valid for the whole life time of the Diagnostic.

Definition at line 151 of file DiagnosticInfo.h.

◆ DiagnosticInfoInlineAsm() [2/3]

llvm::DiagnosticInfoInlineAsm::DiagnosticInfoInlineAsm ( uint64_t  LocCookie,
const Twine MsgStr,
DiagnosticSeverity  Severity = DS_Error 
)
inline

LocCookie if non-zero gives the line number for this report.

MsgStr gives the message. This class does not copy MsgStr, therefore the reference must be valid for the whole life time of the Diagnostic.

Definition at line 159 of file DiagnosticInfo.h.

◆ DiagnosticInfoInlineAsm() [3/3]

DiagnosticInfoInlineAsm::DiagnosticInfoInlineAsm ( const Instruction I,
const Twine MsgStr,
DiagnosticSeverity  Severity = DS_Error 
)

Instr gives the original instruction that triggered the diagnostic.

MsgStr gives the message. This class does not copy MsgStr, therefore the reference must be valid for the whole life time of the Diagnostic. Same for I.

Definition at line 51 of file DiagnosticInfo.cpp.

References I.

Member Function Documentation

◆ classof()

static bool llvm::DiagnosticInfoInlineAsm::classof ( const DiagnosticInfo DI)
inlinestatic

Definition at line 179 of file DiagnosticInfo.h.

References llvm::DK_InlineAsm, and llvm::DiagnosticInfo::getKind().

◆ getInstruction()

const Instruction * llvm::DiagnosticInfoInlineAsm::getInstruction ( ) const
inline

Definition at line 174 of file DiagnosticInfo.h.

◆ getLocCookie()

uint64_t llvm::DiagnosticInfoInlineAsm::getLocCookie ( ) const
inline

Definition at line 172 of file DiagnosticInfo.h.

Referenced by print().

◆ getMsgStr()

const Twine & llvm::DiagnosticInfoInlineAsm::getMsgStr ( ) const
inline

Definition at line 173 of file DiagnosticInfo.h.

Referenced by print().

◆ print()

void DiagnosticInfoInlineAsm::print ( DiagnosticPrinter DP) const
overridevirtual
See also
DiagnosticInfo::print.

Implements llvm::DiagnosticInfo.

Definition at line 63 of file DiagnosticInfo.cpp.

References getLocCookie(), and getMsgStr().


The documentation for this class was generated from the following files: