[llvm] [MSVC][Demangling] Make Microsoft demangling more configurable (PR #202702)

Aaron Ballman via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 12 06:06:55 PDT 2026


================
@@ -623,15 +623,24 @@ void VariableSymbolNode::output(OutputBuffer &OB, OutputFlags Flags) const {
   if (!(Flags & OF_NoMemberType) && IsStatic)
     OB << "static ";
 
-  if (!(Flags & OF_NoVariableType) && Type) {
+  if (!(Flags & OF_NoVariableType) && Type)
     Type->outputPre(OB, Flags);
+  if (shouldOutputName(Flags)) {
     outputSpaceIfNecessary(OB);
+    Name->output(OB, Flags);
   }
-  Name->output(OB, Flags);
   if (!(Flags & OF_NoVariableType) && Type)
     Type->outputPost(OB, Flags);
 }
 
+bool VariableSymbolNode::shouldOutputName(OutputFlags Flags) const {
+  return true;
+}
+
+bool TypeSymbolNode::shouldOutputName(OutputFlags Flags) const {
+  return !(Flags & OF_NoTypeDescription);
+}
----------------
AaronBallman wrote:

Any reason not to define these inline with the declaration?

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


More information about the llvm-commits mailing list