class DiagnosticInfoWithLocationBase

Declaration

class DiagnosticInfoWithLocationBase : public DiagnosticInfo { /* full declaration omitted */ };

Description

Common features for diagnostics with an associated location.

Declared at: llvm/include/llvm/IR/DiagnosticInfo.h:365

Inherits from: DiagnosticInfo

Method Overview

Inherited from DiagnosticInfo:

Methods

DiagnosticInfoWithLocationBase(
    enum DiagnosticKind Kind,
    enum DiagnosticSeverity Severity,
    const llvm::Function& Fn,
    const llvm::DiagnosticLocation& Loc)

Description

\p Fn is the function where the diagnostic is being emitted. \p Loc is the location information to use in the diagnostic.

Declared at: llvm/include/llvm/IR/DiagnosticInfo.h:370

Parameters

enum DiagnosticKind Kind
enum DiagnosticSeverity Severity
const llvm::Function& Fn
const llvm::DiagnosticLocation& Loc

std::string getAbsolutePath() const

Description

Return the absolute path tot the file.

Declared at: llvm/include/llvm/IR/DiagnosticInfo.h:390

const llvm::Function& getFunction() const

Declared at: llvm/include/llvm/IR/DiagnosticInfo.h:392

void getLocation(llvm::StringRef& RelativePath,
                 unsigned int& Line,
                 unsigned int& Column) const

Description

Return location information for this diagnostic in three parts: the relative source file path, line number and column.

Declared at: llvm/include/llvm/IR/DiagnosticInfo.h:386

Parameters

llvm::StringRef& RelativePath
unsigned int& Line
unsigned int& Column

llvm::DiagnosticLocation getLocation() const

Declared at: llvm/include/llvm/IR/DiagnosticInfo.h:393

const std::string getLocationStr() const

Description

Return a string with the location information for this diagnostic in the format "file:line:col". If location information is not available, it returns "<unknown>:0:0".

Declared at: llvm/include/llvm/IR/DiagnosticInfo.h:382

bool isLocationAvailable() const

Description

Return true if location information is available for this diagnostic.

Declared at: llvm/include/llvm/IR/DiagnosticInfo.h:377