llvm/mlir/lib/Target/LLVMIR/DebugImporter.cpp

//===- DebugImporter.cpp - LLVM to MLIR Debug conversion ------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "DebugImporter.h"
#include "mlir/Dialect/LLVMIR/LLVMAttrs.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/Location.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/SetOperations.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/Metadata.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"

usingnamespacemlir;
usingnamespacemlir::LLVM;
usingnamespacemlir::LLVM::detail;

DebugImporter::DebugImporter(ModuleOp mlirModule,
                             bool dropDICompositeTypeElements)
    :{}

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

//===----------------------------------------------------------------------===//
// Attributes
//===----------------------------------------------------------------------===//

DIBasicTypeAttr DebugImporter::translateImpl(llvm::DIBasicType *node) {}

DICompileUnitAttr DebugImporter::translateImpl(llvm::DICompileUnit *node) {}

DICompositeTypeAttr DebugImporter::translateImpl(llvm::DICompositeType *node) {}

DIDerivedTypeAttr DebugImporter::translateImpl(llvm::DIDerivedType *node) {}

DIStringTypeAttr DebugImporter::translateImpl(llvm::DIStringType *node) {}

DIFileAttr DebugImporter::translateImpl(llvm::DIFile *node) {}

DILabelAttr DebugImporter::translateImpl(llvm::DILabel *node) {}

DILexicalBlockAttr DebugImporter::translateImpl(llvm::DILexicalBlock *node) {}

DILexicalBlockFileAttr
DebugImporter::translateImpl(llvm::DILexicalBlockFile *node) {}

DIGlobalVariableAttr
DebugImporter::translateImpl(llvm::DIGlobalVariable *node) {}

DILocalVariableAttr DebugImporter::translateImpl(llvm::DILocalVariable *node) {}

DIVariableAttr DebugImporter::translateImpl(llvm::DIVariable *node) {}

DIScopeAttr DebugImporter::translateImpl(llvm::DIScope *node) {}

DIModuleAttr DebugImporter::translateImpl(llvm::DIModule *node) {}

DINamespaceAttr DebugImporter::translateImpl(llvm::DINamespace *node) {}

DIImportedEntityAttr
DebugImporter::translateImpl(llvm::DIImportedEntity *node) {}

DISubprogramAttr DebugImporter::translateImpl(llvm::DISubprogram *node) {}

DISubrangeAttr DebugImporter::translateImpl(llvm::DISubrange *node) {}

DICommonBlockAttr DebugImporter::translateImpl(llvm::DICommonBlock *node) {}

DISubroutineTypeAttr
DebugImporter::translateImpl(llvm::DISubroutineType *node) {}

DITypeAttr DebugImporter::translateImpl(llvm::DIType *node) {}

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

/// Get the `getRecSelf` constructor for the translated type of `node` if its
/// translated DITypeAttr supports recursion. Otherwise, returns nullptr.
static function_ref<DIRecursiveTypeAttrInterface(DistinctAttr)>
getRecSelfConstructor(llvm::DINode *node) {}

std::optional<DINodeAttr> DebugImporter::createRecSelf(llvm::DINode *node) {}

//===----------------------------------------------------------------------===//
// Locations
//===----------------------------------------------------------------------===//

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

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

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

StringAttr DebugImporter::getStringAttrOrNull(llvm::MDString *stringNode) {}

DistinctAttr DebugImporter::getOrCreateDistinctID(llvm::DINode *node) {}