diff options
author | Enrico Granata <egranata@apple.com> | 2015-10-07 01:41:23 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2015-10-07 01:41:23 +0000 |
commit | 31fda9336cd001c070ed75759a9e49e38ccad9bb (patch) | |
tree | 268a4a3108e5dd0437757dcd3ac7d1035bbcf878 /lldb/source/DataFormatters/FormattersHelpers.cpp | |
parent | 4bc013e18c5d9d2d7de2cb9a8df48ffcde51cc9f (diff) | |
download | bcm5719-llvm-31fda9336cd001c070ed75759a9e49e38ccad9bb.tar.gz bcm5719-llvm-31fda9336cd001c070ed75759a9e49e38ccad9bb.zip |
Introduce a variant of GetSummaryAsCString() that takes a LanguageType argument, and use it when crafting summaries by running selectors
This is the first in a series of commits that are meant to teach LLDB how to properly handle multi-language formatting of values
llvm-svn: 249503
Diffstat (limited to 'lldb/source/DataFormatters/FormattersHelpers.cpp')
-rw-r--r-- | lldb/source/DataFormatters/FormattersHelpers.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/DataFormatters/FormattersHelpers.cpp b/lldb/source/DataFormatters/FormattersHelpers.cpp index 648913ee94b..290fda089f3 100644 --- a/lldb/source/DataFormatters/FormattersHelpers.cpp +++ b/lldb/source/DataFormatters/FormattersHelpers.cpp @@ -187,7 +187,8 @@ bool lldb_private::formatters::ExtractSummaryFromObjCExpression (ValueObject &valobj, const char* target_type, const char* selector, - Stream &stream) + Stream &stream, + lldb::LanguageType lang_type) { if (!target_type || !*target_type) return false; @@ -206,6 +207,8 @@ lldb_private::formatters::ExtractSummaryFromObjCExpression (ValueObject &valobj, options.SetCoerceToId(false); options.SetUnwindOnError(true); options.SetKeepInMemory(true); + options.SetLanguage(lldb::eLanguageTypeObjC_plus_plus); + options.SetResultIsInternal(true); options.SetUseDynamic(lldb::eDynamicCanRunTarget); target->EvaluateExpression(expr.GetData(), @@ -214,7 +217,7 @@ lldb_private::formatters::ExtractSummaryFromObjCExpression (ValueObject &valobj, options); if (!result_sp) return false; - stream.Printf("%s",result_sp->GetSummaryAsCString()); + stream.Printf("%s",result_sp->GetSummaryAsCString(lang_type)); return true; } |