From c6e5c4654bd5045fe22a1a52779e48e2038a404c Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Thu, 25 Feb 2021 16:51:31 +0100 Subject: Don't use $ as suffix for symbol names in ThinLTOBitcodeWriter and other places Using $ breaks demangling of the symbols. For example, $ c++filt _Z3foov\$123 _Z3foov$123 This causes problems for developers who would like to see nice stack traces etc., but also for automatic crash tracking systems which try to organize crashes based on the stack traces. Instead, use the period as suffix separator, since Itanium demanglers normally ignore such suffixes: $ c++filt _Z3foov.123 foo() [clone .123] This is already done in some places; try to do it everywhere. Differential revision: https://reviews.llvm.org/D97484 --- llvm/lib/Transforms/Utils/ModuleUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/Utils/ModuleUtils.cpp') diff --git a/llvm/lib/Transforms/Utils/ModuleUtils.cpp b/llvm/lib/Transforms/Utils/ModuleUtils.cpp index f7bd8f0..74d3239 100644 --- a/llvm/lib/Transforms/Utils/ModuleUtils.cpp +++ b/llvm/lib/Transforms/Utils/ModuleUtils.cpp @@ -289,7 +289,7 @@ std::string llvm::getUniqueModuleId(Module *M) { SmallString<32> Str; MD5::stringifyResult(R, Str); - return ("$" + Str).str(); + return ("." + Str).str(); } void VFABI::setVectorVariantNames( -- cgit v1.1