[PATCH] D142844: [LTO] Demangle the function name in DiagnosticInfoDontCall message
Kyuwon Cho via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 29 09:15:59 PST 2023
ChoKyuWon created this revision.
ChoKyuWon added reviewers: aeubanks, nickdesaulniers.
Herald added subscribers: ormris, hiraditya, inglorion.
Herald added a project: All.
ChoKyuWon requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Previously, dontcall attribute message on LTO prints the mangled function name.
Fixes https://github.com/llvm/llvm-project/issues/58933
https://reviews.llvm.org/D142844
Files:
llvm/lib/IR/DiagnosticInfo.cpp
Index: llvm/lib/IR/DiagnosticInfo.cpp
===================================================================
--- llvm/lib/IR/DiagnosticInfo.cpp
+++ llvm/lib/IR/DiagnosticInfo.cpp
@@ -15,6 +15,7 @@
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/Twine.h"
#include "llvm/ADT/iterator_range.h"
+#include "llvm/Demangle/Demangle.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfoMetadata.h"
@@ -440,7 +441,8 @@
}
void DiagnosticInfoDontCall::print(DiagnosticPrinter &DP) const {
- DP << "call to " << getFunctionName() << " marked \"dontcall-";
+ DP << "call to " << demangle(getFunctionName().str())
+ << " marked \"dontcall-";
if (getSeverity() == DiagnosticSeverity::DS_Error)
DP << "error\"";
else
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142844.493101.patch
Type: text/x-patch
Size: 771 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230129/afdfa575/attachment.bin>
More information about the llvm-commits
mailing list