summaryrefslogtreecommitdiff
path: root/test/Demangle
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-09-06 19:16:48 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-09-06 19:16:48 +0000
commitec44cfdaf0a14fc542b611b223f9be464c688ce5 (patch)
tree07465fa6df5426dcb4aa21a702e01832e2c3f421 /test/Demangle
parent99f377bc53da6add3354a9a861772d2827ed5f8f (diff)
Add an c++ itanium demangler to llvm.
This adds a copy of the demangler in libcxxabi. The code also has no dependencies on anything else in LLVM. To enforce that I added it as another library. That way a BUILD_SHARED_LIBS will fail if anyone adds an use of StringRef for example. The no llvm dependency combined with the fact that this has to build on linux, OS X and Windows required a few changes to the code. In particular: No constexpr. No alignas On OS X at least this library has only one global symbol: __ZN4llvm16itanium_demangleEPKcPcPmPi My current plan is: Commit something like this Change lld to use it Change lldb to use it as the fallback Add a few #ifdefs so that exactly the same file can be used in libcxxabi to export abi::__cxa_demangle. Once the fast demangler in lldb can handle any names this implementation can be replaced with it and we will have the one true demangler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280732 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Demangle')
-rw-r--r--test/Demangle/lit.local.cfg1
-rw-r--r--test/Demangle/simple.test4
2 files changed, 5 insertions, 0 deletions
diff --git a/test/Demangle/lit.local.cfg b/test/Demangle/lit.local.cfg
new file mode 100644
index 00000000000..df9b335dd13
--- /dev/null
+++ b/test/Demangle/lit.local.cfg
@@ -0,0 +1 @@
+config.suffixes = ['.test']
diff --git a/test/Demangle/simple.test b/test/Demangle/simple.test
new file mode 100644
index 00000000000..76e70dbba30
--- /dev/null
+++ b/test/Demangle/simple.test
@@ -0,0 +1,4 @@
+RUN: llvm-cxxfilt _Z1fi abc | FileCheck %s
+
+CHECK: f(int)
+CHECK-NEXT: abc