mirror of
https://github.com/exaloop/codon.git
synced 2025-06-03 15:03:52 +08:00
Better backtrace method names
This commit is contained in:
parent
0c897eaaec
commit
c20c5946fe
@ -700,9 +700,13 @@ llvm::DISubprogram *LLVMVisitor::getDISubprogramForFunc(const Func *x) {
|
||||
auto *derivedType = llvm::cast<llvm::DIDerivedType>(getDIType(x->getType()));
|
||||
auto *subroutineType =
|
||||
llvm::cast<llvm::DISubroutineType>(derivedType->getRawBaseType());
|
||||
|
||||
std::string baseName = x->getUnmangledName();
|
||||
if (auto *parent = x->getParentType())
|
||||
baseName = parent->getName() + "." + baseName;
|
||||
llvm::DISubprogram *subprogram = db.builder->createFunction(
|
||||
file, x->getUnmangledName(), getNameForFunction(x), file, srcInfo->line,
|
||||
subroutineType, /*ScopeLine=*/0, llvm::DINode::FlagZero,
|
||||
file, baseName, getNameForFunction(x), file, srcInfo->line, subroutineType,
|
||||
/*ScopeLine=*/0, llvm::DINode::FlagZero,
|
||||
llvm::DISubprogram::toSPFlags(/*IsLocalToUnit=*/true,
|
||||
/*IsDefinition=*/true, /*IsOptimized=*/!db.debug));
|
||||
return subprogram;
|
||||
|
Loading…
x
Reference in New Issue
Block a user