MLIR  20.0.0git
Public Member Functions | List of all members
mlir::LLVM::detail::DebugImporter Class Reference

#include "Target/LLVMIR/DebugImporter.h"

Public Member Functions

 DebugImporter (ModuleOp mlirModule, bool dropDICompositeTypeElements)
 
Location translateLoc (llvm::DILocation *loc)
 Translates the given LLVM debug location to an MLIR location. More...
 
DIExpressionAttr translateExpression (llvm::DIExpression *node)
 Translates the LLVM DWARF expression metadata to MLIR. More...
 
DIGlobalVariableExpressionAttr translateGlobalVariableExpression (llvm::DIGlobalVariableExpression *node)
 Translates the LLVM DWARF global variable expression metadata to MLIR. More...
 
Location translateFuncLocation (llvm::Function *func)
 Translates the debug information for the given function into a Location. More...
 
DINodeAttr translate (llvm::DINode *node)
 Translates the given LLVM debug metadata to MLIR. More...
 
template<typename DINodeT >
auto translate (DINodeT *node)
 Infers the metadata type and translates it to MLIR. More...
 

Detailed Description

Definition at line 32 of file DebugImporter.h.

Constructor & Destructor Documentation

◆ DebugImporter()

DebugImporter::DebugImporter ( ModuleOp  mlirModule,
bool  dropDICompositeTypeElements 
)

Definition at line 29 of file DebugImporter.cpp.

Member Function Documentation

◆ translate() [1/2]

template<typename DINodeT >
auto mlir::LLVM::detail::DebugImporter::translate ( DINodeT *  node)
inline

Infers the metadata type and translates it to MLIR.

Definition at line 55 of file DebugImporter.h.

References translate().

◆ translate() [2/2]

DINodeAttr DebugImporter::translate ( llvm::DINode *  node)

Translates the given LLVM debug metadata to MLIR.

Definition at line 365 of file DebugImporter.cpp.

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

◆ translateExpression()

DIExpressionAttr DebugImporter::translateExpression ( llvm::DIExpression *  node)

Translates the LLVM DWARF expression metadata to MLIR.

Definition at line 486 of file DebugImporter.cpp.

References mlir::get().

Referenced by translateGlobalVariableExpression().

◆ translateFuncLocation()

Location DebugImporter::translateFuncLocation ( llvm::Function *  func)

Translates the debug information for the given function into a Location.

Returns UnknownLoc if func has no debug information attached to it.

Definition at line 35 of file DebugImporter.cpp.

References mlir::get(), mlir::FileLineColLoc::get(), and translate().

◆ translateGlobalVariableExpression()

DIGlobalVariableExpressionAttr DebugImporter::translateGlobalVariableExpression ( llvm::DIGlobalVariableExpression *  node)

Translates the LLVM DWARF global variable expression metadata to MLIR.

Definition at line 504 of file DebugImporter.cpp.

References mlir::get(), translate(), and translateExpression().

◆ translateLoc()

Location DebugImporter::translateLoc ( llvm::DILocation *  loc)

Translates the given LLVM debug location to an MLIR location.

Definition at line 466 of file DebugImporter.cpp.

References mlir::get(), mlir::FileLineColLoc::get(), and translate().


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