diff mbox series

[pushed] libiberty: Restore build with CP_DEMANGLE_DEBUG defined

Message ID 0102019276b7af60-965ce0ab-633a-4700-b5fe-df96a583a3b8-000000@eu-west-1.amazonses.com
State New
Headers show
Series [pushed] libiberty: Restore build with CP_DEMANGLE_DEBUG defined | expand

Commit Message

Simon Martin Oct. 10, 2024, 1:56 p.m. UTC
cp-demangle.c does not build when CP_DEMANGLE_DEBUG is defined since
r13-2887-gb04208895fed34. This trivial patch fixes the issue.

Tested on x86_64-apple-darwin19.6.0 with "make && make check" in
libiberty with CP_DEMANGLE_DEBUG defined.

I'm applying this as obvious.

libiberty/ChangeLog:

	* cp-demangle.c (d_dump): Fix compilation when CP_DEMANGLE_DEBUG
	is defined.

---
 libiberty/cp-demangle.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index fc2cf64e6e0..5b1bd5dff22 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -655,9 +655,9 @@  d_dump (struct demangle_component *dc, int indent)
       return;
     case DEMANGLE_COMPONENT_EXTENDED_BUILTIN_TYPE:
       {
-	char suffix[2] = { dc->u.s_extended_builtin.type->suffix, 0 };
+	char suffix[2] = { dc->u.s_extended_builtin.suffix, 0 };
 	printf ("builtin type %s%d%s\n", dc->u.s_extended_builtin.type->name,
-		dc->u.s_extended_builtin.type->arg, suffix);
+		dc->u.s_extended_builtin.arg, suffix);
       }
       return;
     case DEMANGLE_COMPONENT_OPERATOR: