summaryrefslogtreecommitdiff
path: root/tools/build/feature/test-cxa-demangle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/build/feature/test-cxa-demangle.cpp')
-rw-r--r--tools/build/feature/test-cxa-demangle.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/build/feature/test-cxa-demangle.cpp b/tools/build/feature/test-cxa-demangle.cpp
new file mode 100644
index 000000000000..a3e712f65c37
--- /dev/null
+++ b/tools/build/feature/test-cxa-demangle.cpp
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <stdio.h>
+#include <stdlib.h>
+#include <cxxabi.h>
+
+int main(void)
+{
+ size_t len = 256;
+ char *output = (char*)malloc(len);
+ int status;
+
+ output = abi::__cxa_demangle("FieldName__9ClassNameFd", output, &len, &status);
+
+ printf("demangled symbol: {%s}\n", output);
+
+ return 0;
+}