diff options
Diffstat (limited to 'lldb/source/Expression')
-rw-r--r-- | lldb/source/Expression/ClangExpression.cpp | 18 | ||||
-rw-r--r-- | lldb/source/Expression/ClangExpressionDeclMap.cpp | 19 | ||||
-rw-r--r-- | lldb/source/Expression/DWARFExpression.cpp | 21 |
3 files changed, 25 insertions, 33 deletions
diff --git a/lldb/source/Expression/ClangExpression.cpp b/lldb/source/Expression/ClangExpression.cpp index e996749de9e..9468a706c0b 100644 --- a/lldb/source/Expression/ClangExpression.cpp +++ b/lldb/source/Expression/ClangExpression.cpp @@ -55,6 +55,7 @@ // Project includes #include "lldb/Core/Log.h" +#include "lldb/Core/ClangForward.h" #include "lldb/Expression/ClangExpression.h" #include "lldb/Expression/ClangASTSource.h" #include "lldb/Expression/ClangResultSynthesizer.h" @@ -74,23 +75,6 @@ using namespace lldb_private; using namespace clang; using namespace llvm; -namespace clang { - -class AnalyzerOptions; -class CodeGenOptions; -class DependencyOutputOptions; -class DiagnosticOptions; -class FrontendOptions; -class HeaderSearchOptions; -class LangOptions; -class PreprocessorOptions; -class PreprocessorOutputOptions; -class TargetInfo; -class TargetOptions; - -} // end namespace clang - - //===----------------------------------------------------------------------===// // Utility Methods diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp index 5a6b6740750..54bfad5772a 100644 --- a/lldb/source/Expression/ClangExpressionDeclMap.cpp +++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp @@ -292,10 +292,11 @@ ClangExpressionDeclMap::DoMaterialize (bool dematerialize, TypeFromUser copied_type(ClangASTContext::CopyType(context, iter->m_parser_type.GetASTContext(), - iter->m_parser_type.GetType()), + iter->m_parser_type.GetOpaqueQualType()), context); - result_value->SetContext(Value::eContextTypeOpaqueClangQualType, copied_type.GetType()); + result_value->SetContext(Value::eContextTypeOpaqueClangQualType, + copied_type.GetOpaqueQualType()); } continue; @@ -329,7 +330,10 @@ ClangExpressionDeclMap::DoMaterializeOneVariable(bool dematerialize, return false; } - log->Printf("%s %s with type %p", (dematerialize ? "Dematerializing" : "Materializing"), name, type.GetType()); + log->Printf("%s %s with type %p", + (dematerialize ? "Dematerializing" : "Materializing"), + name, + type.GetOpaqueQualType()); std::auto_ptr<lldb_private::Value> location_value(GetVariableValue(exe_ctx, var, @@ -345,7 +349,8 @@ ClangExpressionDeclMap::DoMaterializeOneVariable(bool dematerialize, { lldb::addr_t value_addr = location_value->GetScalar().ULongLong(); - size_t bit_size = ClangASTContext::GetTypeBitSize(type.GetASTContext(), type.GetType()); + size_t bit_size = ClangASTContext::GetTypeBitSize (type.GetASTContext(), + type.GetOpaqueQualType()); size_t byte_size = bit_size % 8 ? ((bit_size + 8) / 8) : (bit_size / 8); DataBufferHeap data; @@ -488,7 +493,9 @@ ClangExpressionDeclMap::FindVariableInScope(const SymbolContext &sym_ctx, if (type->GetASTContext() == var->GetType()->GetClangAST()) { - if (!ClangASTContext::AreTypesSame(type->GetASTContext(), type->GetType(), var->GetType()->GetOpaqueClangQualType())) + if (!ClangASTContext::AreTypesSame(type->GetASTContext(), + type->GetOpaqueQualType(), + var->GetType()->GetOpaqueClangQualType())) return NULL; } else @@ -657,7 +664,7 @@ ClangExpressionDeclMap::AddOneVariable(NameSearchContext &context, &ut, &pt); - NamedDecl *var_decl = context.AddVarDecl(pt.GetType()); + NamedDecl *var_decl = context.AddVarDecl(pt.GetOpaqueQualType()); Tuple tuple; diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp index 839cf2ef592..20c97b28e07 100644 --- a/lldb/source/Expression/DWARFExpression.cpp +++ b/lldb/source/Expression/DWARFExpression.cpp @@ -24,6 +24,7 @@ #include "lldb/lldb-private-log.h" +#include "lldb/Symbol/ClangASTType.h" #include "lldb/Symbol/ClangASTContext.h" #include "lldb/Symbol/Type.h" @@ -2273,10 +2274,10 @@ DWARFExpression::Evaluate } else { - if (!Type::SetValueFromScalar(ast_context, - clang_type, - tmp.ResolveValue(exe_ctx, ast_context), - new_value)) + if (!ClangASTType::SetValueFromScalar (ast_context, + clang_type, + tmp.ResolveValue(exe_ctx, ast_context), + new_value)) { if (error_ptr) error_ptr->SetErrorStringWithFormat ("Couldn't extract a value from an integral type.\n"); @@ -2292,12 +2293,12 @@ DWARFExpression::Evaluate { lldb::AddressType address_type = (value_type == Value::eValueTypeLoadAddress ? eAddressTypeLoad : eAddressTypeHost); lldb::addr_t addr = stack.back().GetScalar().ULongLong(LLDB_INVALID_ADDRESS); - if (!Type::WriteToMemory (exe_ctx, - ast_context, - clang_type, - addr, - address_type, - new_value)) + if (!ClangASTType::WriteToMemory (ast_context, + clang_type, + exe_ctx, + addr, + address_type, + new_value)) { if (error_ptr) error_ptr->SetErrorStringWithFormat ("Failed to write value to memory at 0x%llx.\n", addr); |