diff options
author | Pavel Labath <labath@google.com> | 2017-11-13 14:26:21 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2017-11-13 14:26:21 +0000 |
commit | 769b21eaf2438ccba599c7ce0b16bb0ca289f425 (patch) | |
tree | fc43befc1e93d81879f73a9d3f59d062c79b32db /lldb/source/Plugins/Language/CPlusPlus/LibCxxList.cpp | |
parent | d739636ccfa092db8cb6cd8cede7a9506c92cda5 (diff) | |
download | bcm5719-llvm-769b21eaf2438ccba599c7ce0b16bb0ca289f425.tar.gz bcm5719-llvm-769b21eaf2438ccba599c7ce0b16bb0ca289f425.zip |
CompilerType: Add ability to retrieve an integral template argument
Summary:
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.
Reviewers: jingham, clayborg
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D39844
llvm-svn: 318040
Diffstat (limited to 'lldb/source/Plugins/Language/CPlusPlus/LibCxxList.cpp')
-rw-r--r-- | lldb/source/Plugins/Language/CPlusPlus/LibCxxList.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibCxxList.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibCxxList.cpp index 3a8bc2087f8..6407ae129ad 100644 --- a/lldb/source/Plugins/Language/CPlusPlus/LibCxxList.cpp +++ b/lldb/source/Plugins/Language/CPlusPlus/LibCxxList.cpp @@ -192,8 +192,7 @@ bool AbstractListFrontEnd::Update() { if (list_type.GetNumTemplateArguments() == 0) return false; - TemplateArgumentKind kind; - m_element_type = list_type.GetTemplateArgument(0, kind); + m_element_type = list_type.GetTypeTemplateArgument(0); return false; } |