[llvm] [llvm-cxxfilt] Add --quote option to quote demangled function names (PR #111871)

Ronan Keryell via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 12 04:41:05 PDT 2024


================
@@ -64,7 +66,15 @@ static void error(const Twine &Message) {
   exit(1);
 }
 
-static std::string demangle(const std::string &Mangled) {
+// Quote Undecorated with "" if asked for and not already followed by a '"'
+static std::string optionalQuote(std::string Undecorated,
----------------
keryell wrote:

I did this to have the compiler able to move the string from the callee to the caller in the case it is not to be quoted, which is, I guess, the common case. But I might be wrong.

https://github.com/llvm/llvm-project/pull/111871


More information about the llvm-commits mailing list