summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/print-mangled-name.cpp
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan.akhgari@gmail.com>2015-10-08 00:01:20 +0000
committerEhsan Akhgari <ehsan.akhgari@gmail.com>2015-10-08 00:01:20 +0000
commitf8d44de1438a22c1755b27a0e91dc3b7b21bb7f2 (patch)
tree6b724a3ac0c9f6b7e1d5bc845b5317f661dba873 /clang/test/Index/print-mangled-name.cpp
parent94fe836afa104c0618a162e294003e9cbc663540 (diff)
downloadbcm5719-llvm-f8d44de1438a22c1755b27a0e91dc3b7b21bb7f2.tar.gz
bcm5719-llvm-f8d44de1438a22c1755b27a0e91dc3b7b21bb7f2.zip
Make clang_Cursor_getMangling not mangle if the declaration isn't mangled
Right now clang_Cursor_getMangling will attempt to mangle any declaration, even if the declaration isn't mangled (extern C). This results in a partially mangled name which isn't useful for much. This patch makes clang_Cursor_getMangling return an empty string if the declaration isn't mangled. Patch by Michael Wu <mwu@mozilla.com>. llvm-svn: 249639
Diffstat (limited to 'clang/test/Index/print-mangled-name.cpp')
-rw-r--r--clang/test/Index/print-mangled-name.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Index/print-mangled-name.cpp b/clang/test/Index/print-mangled-name.cpp
index 3d74fe5520c..dc6f734dfb7 100644
--- a/clang/test/Index/print-mangled-name.cpp
+++ b/clang/test/Index/print-mangled-name.cpp
@@ -29,3 +29,8 @@ int foo(S, S&);
// ITANIUM: mangled=_Z3foo1SRS_
// MACHO: mangled=__Z3foo1SRS_
// MICROSOFT: mangled=?foo@@YAHUS
+
+extern "C" int foo(int);
+// ITANIUM: mangled=foo
+// MACHO: mangled=_foo
+// MICROSOFT: mangled=_foo
OpenPOWER on IntegriCloud