summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-cxxfilt/underscore.test
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2017-01-22 17:41:10 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2017-01-22 17:41:10 +0000
commite5f6daa47580fa0b007d0dd860b4fcd8a0169d41 (patch)
tree33188731cc2064413b469daffab9594f53f7ed76 /llvm/test/tools/llvm-cxxfilt/underscore.test
parent8f49aede8203a133e75f17c3f18ade745072bb2a (diff)
downloadbcm5719-llvm-e5f6daa47580fa0b007d0dd860b4fcd8a0169d41.tar.gz
bcm5719-llvm-e5f6daa47580fa0b007d0dd860b4fcd8a0169d41.zip
llvm-cxxfilt: support `-_`
Add the `--strip-underscore` option to llvm-cxxfilt to strip the leading underscore. This is useful for when dealing with targets which add a leading underscore. llvm-svn: 292759
Diffstat (limited to 'llvm/test/tools/llvm-cxxfilt/underscore.test')
-rw-r--r--llvm/test/tools/llvm-cxxfilt/underscore.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-cxxfilt/underscore.test b/llvm/test/tools/llvm-cxxfilt/underscore.test
new file mode 100644
index 00000000000..4a4ce898a9c
--- /dev/null
+++ b/llvm/test/tools/llvm-cxxfilt/underscore.test
@@ -0,0 +1,11 @@
+RUN: llvm-cxxfilt -_ __ZN2ns1fE _ZSt1f _f | FileCheck %s -check-prefix CHECK-STRIPPED
+RUN: llvm-cxxfilt __ZN2ns1fE _ZSt1f _f | FileCheck %s -check-prefix CHECK-UNSTRIPPED
+
+CHECK-STRIPPED: ns::f
+CHECK-STRIPPED: _ZSt1f
+CHECK-STRIPPED: _f
+
+CHECK-UNSTRIPPED: __ZN2ns1fE
+CHECK-UNSTRIPPED: std::f
+CHECK-UNSTRIPPED: _f
+
OpenPOWER on IntegriCloud