[Lldb-commits] [lldb] 41a2d7a - [lldb][NFC] Build fix: use TemplateParameterInfos public APIs instead of accessing private members

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 26 19:11:28 PST 2023


Author: Michael Buch
Date: 2023-01-27T03:10:21Z
New Revision: 41a2d7a37cb1665f061a6ec6edd31a749417b024

URL: https://github.com/llvm/llvm-project/commit/41a2d7a37cb1665f061a6ec6edd31a749417b024
DIFF: https://github.com/llvm/llvm-project/commit/41a2d7a37cb1665f061a6ec6edd31a749417b024.diff

LOG: [lldb][NFC] Build fix: use TemplateParameterInfos public APIs instead of accessing private members

Fixes build failures caused by a faulty rebase
in `a29e06bbeaad7012ac85b221f1aaba3fe1d5fd35`

Differential Revision: https://reviews.llvm.org/D140030

Added: 
    

Modified: 
    lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index ec43ed259391..3c1fc4093c3b 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -1440,10 +1440,12 @@ std::string TypeSystemClang::PrintTemplateParams(
   clang::TemplateParameterList *template_param_list =
       CreateTemplateParameterList(getASTContext(), template_param_infos,
                                   ignore);
-  llvm::SmallVector<clang::TemplateArgument, 2> args =
-      template_param_infos.args;
+  llvm::SmallVector<clang::TemplateArgument, 2> args(
+      template_param_infos.GetArgs());
   if (template_param_infos.hasParameterPack()) {
-    args.append(template_param_infos.packed_args->args);
+    llvm::ArrayRef<TemplateArgument> pack_args =
+        template_param_infos.GetParameterPackArgs();
+    args.append(pack_args.begin(), pack_args.end());
   }
   std::string str;
   llvm::raw_string_ostream os(str);


        


More information about the lldb-commits mailing list