[Lldb-commits] [lldb] [lldb][SBAPI] Add new SBType::GetTemplateParameterValue API (PR #126901)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Wed Feb 12 05:17:28 PST 2025
================
@@ -687,6 +687,39 @@ lldb::TemplateArgumentKind SBType::GetTemplateArgumentKind(uint32_t idx) {
return eTemplateArgumentKindNull;
}
+lldb::SBValue SBType::GetTemplateArgumentValue(lldb::SBTarget target,
+ uint32_t idx) {
+ LLDB_INSTRUMENT_VA(this, target, idx);
+
+ if (!IsValid())
+ return {};
+
+ std::optional<CompilerType::IntegralTemplateArgument> arg;
+ const bool expand_pack = true;
+ switch (GetTemplateArgumentKind(idx)) {
+ case eTemplateArgumentKindIntegral:
+ arg = m_opaque_sp->GetCompilerType(false).GetIntegralTemplateArgument(
+ idx, expand_pack);
+ break;
+ default:
+ break;
+ }
+
+ if (!arg)
+ return {};
+
+ Scalar value{arg->value};
+
+ if (!value.IsValid())
----------------
Michael137 wrote:
Yea we don't need this
https://github.com/llvm/llvm-project/pull/126901
More information about the lldb-commits
mailing list