diff options
| author | Enrico Granata <egranata@apple.com> | 2016-05-05 01:47:44 +0000 |
|---|---|---|
| committer | Enrico Granata <egranata@apple.com> | 2016-05-05 01:47:44 +0000 |
| commit | 5ee54086251b7380c2997ff090311cdb739c17ea (patch) | |
| tree | 145e11ab704b7cf141508966d59fc0f2da31afe2 /lldb/source/Plugins/LanguageRuntime/CPlusPlus | |
| parent | 8752be775c938cf528dd3471d69f6e36e8f6c100 (diff) | |
| download | bcm5719-llvm-5ee54086251b7380c2997ff090311cdb739c17ea.tar.gz bcm5719-llvm-5ee54086251b7380c2997ff090311cdb739c17ea.zip | |
Allow LanguageRuntimes to return an error if they fail in the course of dynamic type discovery
This is not meant to report that a value doesn't have a dynamic type - it is only meant as a mechanism to propagate actual type discovery issues (e.g. malformed type metadata for languages that have such a notion)
This information is used by ValueObjectDynamic to set its own m_error, which is a fairly sharp and heavyweight tool to begin with
For the time being, this is an architectural improvement but a practical no-op as no existing runtimes are actually setting errors
llvm-svn: 268591
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/CPlusPlus')
| -rw-r--r-- | lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp | 4 | ||||
| -rw-r--r-- | lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp index ab5cbac2dde..84cbc11a5f0 100644 --- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp @@ -53,7 +53,8 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value, lldb::DynamicValueType use_dynamic, TypeAndOrName &class_type_or_name, Address &dynamic_address, - Value::ValueType &value_type) + Value::ValueType &value_type, + Error &error) { // For Itanium, if the type has a vtable pointer in the object, it will be at offset 0 // in the object. That will point to the "address point" within the vtable (not the beginning of the @@ -63,6 +64,7 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value, // start of the value object which holds the dynamic type. // + error.Clear(); class_type_or_name.Clear(); value_type = Value::ValueType::eValueTypeScalar; diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h index c06b9863a9b..d12752748b9 100644 --- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h +++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h @@ -53,7 +53,8 @@ namespace lldb_private { lldb::DynamicValueType use_dynamic, TypeAndOrName &class_type_or_name, Address &address, - Value::ValueType &value_type) override; + Value::ValueType &value_type, + Error &error) override; TypeAndOrName FixUpDynamicType(const TypeAndOrName& type_and_or_name, |

