LLVM 20.0.0git
Public Member Functions | List of all members
llvm::DiagnosticLocation Class Reference

#include "llvm/IR/DiagnosticInfo.h"

Public Member Functions

 DiagnosticLocation ()=default
 
 DiagnosticLocation (const DebugLoc &DL)
 
 DiagnosticLocation (const DISubprogram *SP)
 
bool isValid () const
 
std::string getAbsolutePath () const
 Return the full path to the file.
 
StringRef getRelativePath () const
 Return the file name relative to the compilation directory.
 
unsigned getLine () const
 
unsigned getColumn () const
 

Detailed Description

Definition at line 320 of file DiagnosticInfo.h.

Constructor & Destructor Documentation

◆ DiagnosticLocation() [1/3]

llvm::DiagnosticLocation::DiagnosticLocation ( )
default

◆ DiagnosticLocation() [2/3]

DiagnosticLocation::DiagnosticLocation ( const DebugLoc DL)

Definition at line 145 of file DiagnosticInfo.cpp.

References DL.

◆ DiagnosticLocation() [3/3]

DiagnosticLocation::DiagnosticLocation ( const DISubprogram SP)

Definition at line 153 of file DiagnosticInfo.cpp.

References llvm::DIScope::getFile().

Member Function Documentation

◆ getAbsolutePath()

std::string DiagnosticLocation::getAbsolutePath ( ) const

◆ getColumn()

unsigned llvm::DiagnosticLocation::getColumn ( ) const
inline

Definition at line 336 of file DiagnosticInfo.h.

Referenced by llvm::DiagnosticInfoWithLocationBase::getLocation().

◆ getLine()

unsigned llvm::DiagnosticLocation::getLine ( ) const
inline

◆ getRelativePath()

StringRef DiagnosticLocation::getRelativePath ( ) const

Return the file name relative to the compilation directory.

Definition at line 162 of file DiagnosticInfo.cpp.

References llvm::DIScope::getFilename().

Referenced by llvm::DiagnosticInfoWithLocationBase::getLocation().

◆ isValid()

bool llvm::DiagnosticLocation::isValid ( ) const
inline

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