Fix lldb build failure due to clang mangler change
authorYaxun (Sam) Liu <yaxun.liu@amd.com>
Sun, 8 Mar 2020 05:38:30 +0000 (00:38 -0500)
committerYaxun (Sam) Liu <yaxun.liu@amd.com>
Sun, 8 Mar 2020 05:38:30 +0000 (00:38 -0500)
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

index 3b8c058..47f1a85 100644 (file)
@@ -8843,11 +8843,15 @@ ConstString TypeSystemClang::DeclGetMangledName(void *opaque_decl) {
         llvm::SmallVector<char, 1024> buf;
         llvm::raw_svector_ostream llvm_ostrm(buf);
         if (llvm::isa<clang::CXXConstructorDecl>(nd)) {
-          mc->mangleCXXCtor(llvm::dyn_cast<clang::CXXConstructorDecl>(nd),
-                            Ctor_Complete, llvm_ostrm);
+          mc->mangleName(
+              clang::GlobalDecl(llvm::dyn_cast<clang::CXXConstructorDecl>(nd),
+                                Ctor_Complete),
+              llvm_ostrm);
         } else if (llvm::isa<clang::CXXDestructorDecl>(nd)) {
-          mc->mangleCXXDtor(llvm::dyn_cast<clang::CXXDestructorDecl>(nd),
-                            Dtor_Complete, llvm_ostrm);
+          mc->mangleName(
+              clang::GlobalDecl(llvm::dyn_cast<clang::CXXDestructorDecl>(nd),
+                                Dtor_Complete),
+              llvm_ostrm);
         } else {
           mc->mangleName(nd, llvm_ostrm);
         }