diff options
| author | Enrico Granata <egranata@apple.com> | 2015-09-17 22:56:38 +0000 |
|---|---|---|
| committer | Enrico Granata <egranata@apple.com> | 2015-09-17 22:56:38 +0000 |
| commit | 0b6003f3e6cb0ab883bdffe56d91accf05898a30 (patch) | |
| tree | 51255380493be90c9f413f826bb7f2d5f93656f9 /lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp | |
| parent | 4151972c22cfc914c91734a9bfc066ea6d3b5dc4 (diff) | |
| download | bcm5719-llvm-0b6003f3e6cb0ab883bdffe56d91accf05898a30.tar.gz bcm5719-llvm-0b6003f3e6cb0ab883bdffe56d91accf05898a30.zip | |
Make LanguageRuntime::GetDynamicTypeAndAddress return a ValueType
For C++ and ObjC, dynamic values are always (at least somewhat) pointer-like in nature, so a ValueType of scalar is actually good enough that it could originally be hardcoded as the right choice
Other languages, might have broader notions of things that are dynamic (e.g. a language where a value type can be dynamic). In those cases, it might actually be the case that a dynamic value is a pointer-to the data, or even a host address if dynamic expression results entirely in host space are being talked about
This patch enables the language runtime to make that decision, and makes ValueObjectDynamicValue comply with it
llvm-svn: 247957
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp')
| -rw-r--r-- | lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp index ac643064415..2dcac87a514 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -376,13 +376,15 @@ bool AppleObjCRuntimeV2::GetDynamicTypeAndAddress (ValueObject &in_value, DynamicValueType use_dynamic, TypeAndOrName &class_type_or_name, - Address &address) + Address &address, + Value::ValueType &value_type) { // The Runtime is attached to a particular process, you shouldn't pass in a value from another process. assert (in_value.GetProcessSP().get() == m_process); assert (m_process != NULL); class_type_or_name.Clear(); + value_type = Value::ValueType::eValueTypeScalar; // Make sure we can have a dynamic value before starting... if (CouldHaveDynamicValue (in_value)) |

