diff options
Diffstat (limited to 'include/lldb/Core/Value.h')
-rw-r--r-- | include/lldb/Core/Value.h | 41 |
1 files changed, 16 insertions, 25 deletions
diff --git a/include/lldb/Core/Value.h b/include/lldb/Core/Value.h index 957cedeb0dcc6..a6d934afd294e 100644 --- a/include/lldb/Core/Value.h +++ b/include/lldb/Core/Value.h @@ -12,23 +12,21 @@ // C Includes // C++ Includes -#include <string> #include <vector> + // Other libraries and framework includes // Project includes #include "lldb/lldb-private.h" -#include "lldb/Core/ClangForward.h" #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/Error.h" #include "lldb/Core/Scalar.h" -#include "lldb/Symbol/ClangASTType.h" +#include "lldb/Symbol/CompilerType.h" namespace lldb_private { class Value { public: - // Values Less than zero are an error, greater than or equal to zero // returns what the Scalar result is. enum ValueType @@ -101,6 +99,7 @@ public: // Casts a vector, if valid, to an unsigned int of matching or largest supported size. // Truncates to the beginning of the vector if required. // Returns a default constructed Scalar if the Vector data is internally inconsistent. + llvm::APInt rhs = llvm::APInt(BITWIDTH_INT128, NUM_OF_WORDS_INT128, ((type128 *)bytes)->x); Scalar GetAsScalar() const { @@ -111,11 +110,7 @@ public: else if (length == 2) scalar = *(const uint16_t *)bytes; else if (length == 4) scalar = *(const uint32_t *)bytes; else if (length == 8) scalar = *(const uint64_t *)bytes; -#if defined (ENABLE_128_BIT_SUPPORT) - else if (length >= 16) scalar = *(const __uint128_t *)bytes; -#else - else if (length >= 16) scalar = *(const uint64_t *)bytes; -#endif + else if (length >= 16) scalar = rhs; } return scalar; } @@ -136,11 +131,11 @@ public: Value & operator=(const Value &rhs); - const ClangASTType & - GetClangType(); + const CompilerType & + GetCompilerType(); void - SetClangType (const ClangASTType &clang_type); + SetCompilerType (const CompilerType &compiler_type); ValueType GetValueType() const; @@ -163,7 +158,7 @@ public: void ClearContext () { - m_context = NULL; + m_context = nullptr; m_context_type = eContextTypeInvalid; } @@ -269,13 +264,13 @@ public: GetValueDefaultFormat (); uint64_t - GetValueByteSize (Error *error_ptr); + GetValueByteSize (Error *error_ptr, ExecutionContext *exe_ctx); Error - GetValueAsData (ExecutionContext *exe_ctx, - DataExtractor &data, - uint32_t data_offset, - Module *module); // Can be NULL + GetValueAsData(ExecutionContext *exe_ctx, + DataExtractor &data, + uint32_t data_offset, + Module *module); // Can be nullptr static const char * GetValueTypeAsCString (ValueType context_type); @@ -292,7 +287,7 @@ public: protected: Scalar m_value; Vector m_vector; - ClangASTType m_clang_type; + CompilerType m_compiler_type; void * m_context; ValueType m_value_type; ContextType m_context_type; @@ -309,9 +304,7 @@ public: ValueList (const ValueList &rhs); - ~ValueList () - { - } + ~ValueList() = default; const ValueList & operator= (const ValueList &rhs); @@ -322,8 +315,6 @@ public: Value *GetValueAtIndex(size_t idx); void Clear(); -protected: - private: typedef std::vector<Value> collection; @@ -332,4 +323,4 @@ private: } // namespace lldb_private -#endif // liblldb_Value_h_ +#endif // liblldb_Value_h_ |