MLIR 22.0.0git
mlir::LLVM::detail::DebugTranslation Class Reference

#include "Target/LLVMIR/DebugTranslation.h"

Public Member Functions

 DebugTranslation (Operation *module, llvm::Module &llvmModule)
void addModuleFlagsIfNotPresent ()
 Adds the necessary module flags to the module, if not yet present.
llvm::DILocation * translateLoc (Location loc, llvm::DILocalScope *scope)
 Translate the given location to an llvm debug location.
llvm::DIExpression * translateExpression (LLVM::DIExpressionAttr attr)
 Translates the given DWARF expression metadata to to LLVM.
llvm::DIGlobalVariableExpression * translateGlobalVariableExpression (LLVM::DIGlobalVariableExpressionAttr attr)
 Translates the given DWARF global variable expression to LLVM.
void translate (LLVMFuncOp func, llvm::Function &llvmFunc)
 Translate the debug information for the given function.
llvm::DINode * translate (DINodeAttr attr)
 Translate the given LLVM debug metadata to LLVM.
template<typename DIAttrT>
auto translate (DIAttrT attr)
 Translate the given derived LLVM debug metadata to LLVM.

Detailed Description

Definition at line 30 of file DebugTranslation.h.

Constructor & Destructor Documentation

◆ DebugTranslation()

DebugTranslation::DebugTranslation ( Operation * module,
llvm::Module & llvmModule )

Member Function Documentation

◆ addModuleFlagsIfNotPresent()

void DebugTranslation::addModuleFlagsIfNotPresent ( )

Adds the necessary module flags to the module, if not yet present.

Definition at line 40 of file DebugTranslation.cpp.

References kCodeViewKey, and kDebugVersionKey.

◆ translate() [1/3]

template<typename DIAttrT>
auto mlir::LLVM::detail::DebugTranslation::translate ( DIAttrT attr)
inline

Translate the given derived LLVM debug metadata to LLVM.

Definition at line 55 of file DebugTranslation.h.

References translate().

◆ translate() [2/3]

llvm::DINode * DebugTranslation::translate ( DINodeAttr attr)

Translate the given LLVM debug metadata to LLVM.

Definition at line 451 of file DebugTranslation.cpp.

◆ translate() [3/3]

void DebugTranslation::translate ( LLVMFuncOp func,
llvm::Function & llvmFunc )

Translate the debug information for the given function.

Definition at line 59 of file DebugTranslation.cpp.

References translate().

Referenced by translate(), translate(), and translateGlobalVariableExpression().

◆ translateExpression()

llvm::DIExpression * DebugTranslation::translateExpression ( LLVM::DIExpressionAttr attr)

Translates the given DWARF expression metadata to to LLVM.

Definition at line 494 of file DebugTranslation.cpp.

Referenced by translateGlobalVariableExpression().

◆ translateGlobalVariableExpression()

llvm::DIGlobalVariableExpression * DebugTranslation::translateGlobalVariableExpression ( LLVM::DIGlobalVariableExpressionAttr attr)

Translates the given DWARF global variable expression to LLVM.

Definition at line 507 of file DebugTranslation.cpp.

References translate(), and translateExpression().

◆ translateLoc()

llvm::DILocation * DebugTranslation::translateLoc ( Location loc,
llvm::DILocalScope * scope )

Translate the given location to an llvm debug location.

Definition at line 486 of file DebugTranslation.cpp.

References translateLoc().

Referenced by translateLoc().


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