[Lldb-commits] [PATCH] D39844: CompilerType: Add ability to retrieve an integral template argument

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 9 07:18:06 PST 2017


labath created this revision.

Despite it's name, GetTemplateArgument was only really working for Type
template arguments. This adds the ability to retrieve integral arguments
as well (which I've needed for the std::bitset data formatter).

I've done this by splitting the function into three pieces. The idea is
that one first calls GetTemplateArgumentKind (first function) to
determine the what kind of a parameter this is. Based on that, one can
then use specialized functions to retrieve the correct value. Currently,
I only implement two of these: GetTypeTemplateArgument and
GetIntegralTemplateArgument.


https://reviews.llvm.org/D39844

Files:
  include/lldb/Symbol/ClangASTContext.h
  include/lldb/Symbol/CompilerType.h
  include/lldb/Symbol/GoASTContext.h
  include/lldb/Symbol/JavaASTContext.h
  include/lldb/Symbol/OCamlASTContext.h
  include/lldb/Symbol/TypeSystem.h
  include/lldb/lldb-enumerations.h
  source/API/SBType.cpp
  source/Plugins/Language/CPlusPlus/LibCxx.cpp
  source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp
  source/Plugins/Language/CPlusPlus/LibCxxList.cpp
  source/Plugins/Language/CPlusPlus/LibCxxMap.cpp
  source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp
  source/Plugins/Language/CPlusPlus/LibCxxVector.cpp
  source/Plugins/Language/CPlusPlus/LibStdcpp.cpp
  source/Symbol/ClangASTContext.cpp
  source/Symbol/CompilerType.cpp
  source/Symbol/JavaASTContext.cpp
  unittests/Symbol/TestClangASTContext.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39844.122247.patch
Type: text/x-patch
Size: 24614 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20171109/ba4bee46/attachment-0001.bin>


More information about the lldb-commits mailing list