summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ClangExpressionDeclMap.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-04-18 18:10:51 +0000
committerGreg Clayton <gclayton@apple.com>2013-04-18 18:10:51 +0000
commite01e07b6e76ad6f571cefe679d112fede88cf1db (patch)
tree20979ebc3dfe96a71174222e2fee18f30f772abf /lldb/source/Expression/ClangExpressionDeclMap.cpp
parent56f976f6bda043e5bdbd35e5d92968a112b74a10 (diff)
downloadbcm5719-llvm-e01e07b6e76ad6f571cefe679d112fede88cf1db.tar.gz
bcm5719-llvm-e01e07b6e76ad6f571cefe679d112fede88cf1db.zip
Since we use C++11, we should switch over to using std::unique_ptr when C++11 is being used. To do this, we follow what we have done for shared pointers and we define a STD_UNIQUE_PTR macro that can be used and it will "do the right thing". Due to some API differences in std::unique_ptr and due to the fact that we need to be able to compile without C++11, we can't use move semantics so some code needed to change so that it can compile with either C++.
Anyone wanting to use a unique_ptr or auto_ptr should now use the "STD_UNIQUE_PTR(TYPE)" macro. llvm-svn: 179779
Diffstat (limited to 'lldb/source/Expression/ClangExpressionDeclMap.cpp')
-rw-r--r--lldb/source/Expression/ClangExpressionDeclMap.cpp12
1 files changed, 6 insertions, 6 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
OpenPOWER on IntegriCloud