summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Expression')
-rw-r--r--lldb/source/Expression/ClangExpressionDeclMap.cpp12
-rw-r--r--lldb/source/Expression/ClangExpressionParser.cpp24
-rw-r--r--lldb/source/Expression/ClangFunction.cpp1
-rw-r--r--lldb/source/Expression/ClangUserExpression.cpp2
-rw-r--r--lldb/source/Expression/ClangUtilityFunction.cpp1
-rw-r--r--lldb/source/Expression/DWARFExpression.cpp4
-rw-r--r--lldb/source/Expression/IRExecutionUnit.cpp8
-rw-r--r--lldb/source/Expression/IRInterpreter.cpp2
8 files changed, 28 insertions, 26 deletions
diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp
index f72feb4835a..ec2dbf6b8a0 100644
--- a/lldb/source/Expression/ClangExpressionDeclMap.cpp
+++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp
@@ -1117,7 +1117,7 @@ ClangExpressionDeclMap::LookupDecl (clang::NamedDecl *decl, ClangExpressionVaria
if (parser_vars->m_lldb_var)
{
- std::auto_ptr<Value> value(GetVariableValue(parser_vars->m_lldb_var, NULL));
+ STD_UNIQUE_PTR(Value) value(GetVariableValue(parser_vars->m_lldb_var, NULL));
if (is_reference && value.get() && value->GetValueType() == Value::eValueTypeLoadAddress)
{
@@ -1252,7 +1252,7 @@ ClangExpressionDeclMap::GetSpecialValue (const ConstString &name)
!var->LocationIsValidForFrame (frame))
return Value();
- std::auto_ptr<Value> value(GetVariableValue(var, NULL));
+ STD_UNIQUE_PTR(Value) value(GetVariableValue(var, NULL));
if (value.get() && value->GetValueType() == Value::eValueTypeLoadAddress)
{
@@ -1347,7 +1347,7 @@ ClangExpressionDeclMap::GetObjectPointer
return false;
}
- std::auto_ptr<lldb_private::Value> location_value(GetVariableValue(object_ptr_var,
+ STD_UNIQUE_PTR(lldb_private::Value) location_value(GetVariableValue(object_ptr_var,
NULL));
if (!location_value.get())
@@ -2534,7 +2534,7 @@ ClangExpressionDeclMap::GetVariableValue
DWARFExpression &var_location_expr = var->LocationExpression();
- std::auto_ptr<Value> var_location(new Value);
+ STD_UNIQUE_PTR(Value) var_location(new Value);
lldb::addr_t loclist_base_load_addr = LLDB_INVALID_ADDRESS;
@@ -2756,7 +2756,7 @@ ClangExpressionDeclMap::AddOneGenericVariable(NameSearchContext &context,
m_parser_vars->m_target_info.address_byte_size));
assert (entity.get());
- std::auto_ptr<Value> symbol_location(new Value);
+ STD_UNIQUE_PTR(Value) symbol_location(new Value);
const Address &symbol_address = symbol.GetAddress();
lldb::addr_t symbol_load_addr = symbol_address.GetLoadAddress(target);
@@ -2900,7 +2900,7 @@ ClangExpressionDeclMap::AddOneFunction (NameSearchContext &context,
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
NamedDecl *fun_decl = NULL;
- std::auto_ptr<Value> fun_location(new Value);
+ STD_UNIQUE_PTR(Value) fun_location(new Value);
const Address *fun_address = NULL;
// only valid for Functions, not for Symbols
diff --git a/lldb/source/Expression/ClangExpressionParser.cpp b/lldb/source/Expression/ClangExpressionParser.cpp
index 59b00bf5f04..2922898a0ca 100644
--- a/lldb/source/Expression/ClangExpressionParser.cpp
+++ b/lldb/source/Expression/ClangExpressionParser.cpp
@@ -188,7 +188,7 @@ ClangExpressionParser::ClangExpressionParser (ExecutionContextScope *exe_scope,
ClangExpression &expr) :
m_expr (expr),
m_compiler (),
- m_code_generator (NULL)
+ m_code_generator ()
{
// Initialize targets first, so that --version shows registered targets.
static struct InitializeLLVM {
@@ -351,13 +351,13 @@ ClangExpressionParser::ClangExpressionParser (ExecutionContextScope *exe_scope,
m_selector_table.reset(new SelectorTable());
m_builtin_context.reset(new Builtin::Context());
- std::auto_ptr<clang::ASTContext> ast_context(new ASTContext(m_compiler->getLangOpts(),
- m_compiler->getSourceManager(),
- &m_compiler->getTarget(),
- m_compiler->getPreprocessor().getIdentifierTable(),
- *m_selector_table.get(),
- *m_builtin_context.get(),
- 0));
+ STD_UNIQUE_PTR(clang::ASTContext) ast_context(new ASTContext(m_compiler->getLangOpts(),
+ m_compiler->getSourceManager(),
+ &m_compiler->getTarget(),
+ m_compiler->getPreprocessor().getIdentifierTable(),
+ *m_selector_table.get(),
+ *m_builtin_context.get(),
+ 0));
ClangExpressionDeclMap *decl_map = m_expr.DeclMap();
@@ -462,7 +462,7 @@ static bool FindFunctionInModule (ConstString &mangled_name,
Error
ClangExpressionParser::PrepareForExecution (lldb::addr_t &func_addr,
lldb::addr_t &func_end,
- std::auto_ptr<IRExecutionUnit> &execution_unit_ap,
+ STD_UNIQUE_PTR(IRExecutionUnit) &execution_unit_ap,
ExecutionContext &exe_ctx,
bool &evaluated_statically,
lldb::ClangExpressionVariableSP &const_result,
@@ -472,11 +472,11 @@ ClangExpressionParser::PrepareForExecution (lldb::addr_t &func_addr,
func_end = LLDB_INVALID_ADDRESS;
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
- std::auto_ptr<llvm::ExecutionEngine> execution_engine_ap;
+ STD_UNIQUE_PTR(llvm::ExecutionEngine) execution_engine_ap;
Error err;
- std::auto_ptr<llvm::Module> module_ap (m_code_generator->ReleaseModule());
+ STD_UNIQUE_PTR(llvm::Module) module_ap (m_code_generator->ReleaseModule());
if (!module_ap.get())
{
@@ -596,7 +596,7 @@ ClangExpressionParser::PrepareForExecution (lldb::addr_t &func_addr,
m_execution_unit->GetRunnableInfo(err, func_addr, func_end);
- execution_unit_ap = m_execution_unit;
+ execution_unit_ap.reset (m_execution_unit.release());
return err;
}
diff --git a/lldb/source/Expression/ClangFunction.cpp b/lldb/source/Expression/ClangFunction.cpp
index 74fb0c0e806..c0131b06a58 100644
--- a/lldb/source/Expression/ClangFunction.cpp
+++ b/lldb/source/Expression/ClangFunction.cpp
@@ -25,6 +25,7 @@
#include "lldb/Expression/ASTStructExtractor.h"
#include "lldb/Expression/ClangExpressionParser.h"
#include "lldb/Expression/ClangFunction.h"
+#include "lldb/Expression/IRExecutionUnit.h"
#include "lldb/Symbol/Type.h"
#include "lldb/Core/DataExtractor.h"
#include "lldb/Core/State.h"
diff --git a/lldb/source/Expression/ClangUserExpression.cpp b/lldb/source/Expression/ClangUserExpression.cpp
index 1a11b977838..6f65b11a686 100644
--- a/lldb/source/Expression/ClangUserExpression.cpp
+++ b/lldb/source/Expression/ClangUserExpression.cpp
@@ -396,7 +396,7 @@ ClangUserExpression::Parse (Stream &error_stream,
ApplyObjcCastHack(m_expr_text);
//ApplyUnicharHack(m_expr_text);
- std::auto_ptr <ExpressionSourceCode> source_code (ExpressionSourceCode::CreateWrapped(m_expr_prefix.c_str(), m_expr_text.c_str()));
+ STD_UNIQUE_PTR(ExpressionSourceCode) source_code (ExpressionSourceCode::CreateWrapped(m_expr_prefix.c_str(), m_expr_text.c_str()));
lldb::LanguageType lang_type;
diff --git a/lldb/source/Expression/ClangUtilityFunction.cpp b/lldb/source/Expression/ClangUtilityFunction.cpp
index 3fcc2490725..aed0e244e7f 100644
--- a/lldb/source/Expression/ClangUtilityFunction.cpp
+++ b/lldb/source/Expression/ClangUtilityFunction.cpp
@@ -23,6 +23,7 @@
#include "lldb/Expression/ClangExpressionParser.h"
#include "lldb/Expression/ClangUtilityFunction.h"
#include "lldb/Expression/ExpressionSourceCode.h"
+#include "lldb/Expression/IRExecutionUnit.h"
#include "lldb/Host/Host.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/Target.h"
diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp
index c9e03519449..c3451a49590 100644
--- a/lldb/source/Expression/DWARFExpression.cpp
+++ b/lldb/source/Expression/DWARFExpression.cpp
@@ -1062,8 +1062,8 @@ DWARFExpression::Update_DW_OP_addr (lldb::addr_t file_addr)
// we then replace the data for this expression
// So first we copy the data into a heap buffer
- std::auto_ptr<DataBufferHeap> head_data_ap (new DataBufferHeap (m_data.GetDataStart(),
- m_data.GetByteSize()));
+ STD_UNIQUE_PTR(DataBufferHeap) head_data_ap (new DataBufferHeap (m_data.GetDataStart(),
+ m_data.GetByteSize()));
// Make en encoder so we can write the address into the buffer using
// the correct byte order (endianness)
diff --git a/lldb/source/Expression/IRExecutionUnit.cpp b/lldb/source/Expression/IRExecutionUnit.cpp
index 206a6a394f2..d6dfe949731 100644
--- a/lldb/source/Expression/IRExecutionUnit.cpp
+++ b/lldb/source/Expression/IRExecutionUnit.cpp
@@ -25,14 +25,14 @@
using namespace lldb_private;
-IRExecutionUnit::IRExecutionUnit (std::auto_ptr<llvm::LLVMContext> &context_ap,
- std::auto_ptr<llvm::Module> &module_ap,
+IRExecutionUnit::IRExecutionUnit (STD_UNIQUE_PTR(llvm::LLVMContext) &context_ap,
+ STD_UNIQUE_PTR(llvm::Module) &module_ap,
ConstString &name,
const lldb::TargetSP &target_sp,
std::vector<std::string> &cpu_features) :
IRMemoryMap(target_sp),
- m_context_ap(context_ap),
- m_module_ap(module_ap),
+ m_context_ap(context_ap.release()),
+ m_module_ap(module_ap.release()),
m_module(m_module_ap.get()),
m_cpu_features(cpu_features),
m_name(name),
diff --git a/lldb/source/Expression/IRInterpreter.cpp b/lldb/source/Expression/IRInterpreter.cpp
index 419165c79b1..622156302ae 100644
--- a/lldb/source/Expression/IRInterpreter.cpp
+++ b/lldb/source/Expression/IRInterpreter.cpp
@@ -817,7 +817,7 @@ IRInterpreter::maybeRunOnFunction (lldb_private::ClangExpressionDeclMap *decl_ma
}
static const char *unsupported_opcode_error = "Interpreter doesn't handle one of the expression's opcodes";
-static const char *interpreter_initialization_error = "Interpreter couldn't be initialized";
+//static const char *interpreter_initialization_error = "Interpreter couldn't be initialized";
static const char *interpreter_internal_error = "Interpreter encountered an internal error";
static const char *bad_value_error = "Interpreter couldn't resolve a value during execution";
static const char *memory_allocation_error = "Interpreter couldn't allocate memory";
OpenPOWER on IntegriCloud