[PATCH] D19135: [sanitizers] Teach the internal demangler about Swift names

Anna Zaks via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 15 11:24:35 PDT 2016


zaks.anna added inline comments.

================
Comment at: lib/sanitizer_common/tests/sanitizer_symbolizer_test.cc:59
@@ +58,3 @@
+TEST(Symbolizer, DemangleCXXAndSwift) {
+  // The Swift name will only be demangled if the Swift runtime is linked in.
+  EXPECT_STREQ("_TtSd", DemangleCXXAndSwift("_TtSd"));
----------------
aizatsky wrote:
> Let's have two separate test cases: DemangleCXX and DemangleSwift.
> 
> Let's also make the comment a statement.
> // Swift names are not demangled in default llvm build because Swift runtime is not linked in.
> Let's have two separate test cases: DemangleCXX and DemangleSwift.
It's important to test DemangleCXXAndSwift specifically since it's the only API that others will call and testing it ensures that the chaining works. (DemangleCXX and DemangleSwift are not exposed in the header and should not be.)


http://reviews.llvm.org/D19135





More information about the llvm-commits mailing list