[Lldb-commits] [lldb] r179796 - Missed some cases when switching over to using our STD_UNIQUE_PTR macros.

Greg Clayton gclayton at apple.com
Thu Apr 18 14:02:00 PDT 2013


Author: gclayton
Date: Thu Apr 18 16:01:59 2013
New Revision: 179796

URL: http://llvm.org/viewvc/llvm-project?rev=179796&view=rev
Log:
Missed some cases when switching over to using our STD_UNIQUE_PTR macros.


Modified:
    lldb/trunk/include/lldb/API/SBValueList.h
    lldb/trunk/include/lldb/Core/Log.h
    lldb/trunk/include/lldb/Expression/IRMemoryMap.h
    lldb/trunk/include/lldb/Expression/Materializer.h
    lldb/trunk/include/lldb/lldb-types.h
    lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
    lldb/trunk/tools/lldb-perf/lib/Gauge.cpp
    lldb/trunk/tools/lldb-perf/lib/MemoryGauge.cpp
    lldb/trunk/tools/lldb-perf/lib/Results.cpp
    lldb/trunk/tools/lldb-perf/lib/Results.h

Modified: lldb/trunk/include/lldb/API/SBValueList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBValueList.h?rev=179796&r1=179795&r2=179796&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBValueList.h (original)
+++ lldb/trunk/include/lldb/API/SBValueList.h Thu Apr 18 16:01:59 2013
@@ -86,7 +86,7 @@ private:
     ValueListImpl &
     ref ();
     
-    std::unique_ptr<ValueListImpl> m_opaque_ap;
+    STD_UNIQUE_PTR(ValueListImpl) m_opaque_ap;
 };
 
 

Modified: lldb/trunk/include/lldb/Core/Log.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Log.h?rev=179796&r1=179795&r2=179796&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Log.h (original)
+++ lldb/trunk/include/lldb/Core/Log.h Thu Apr 18 16:01:59 2013
@@ -224,7 +224,7 @@ public:
     ListCategories (Stream *strm) = 0;
 
 protected:
-    std::unique_ptr<Log> m_log_ap;
+    STD_UNIQUE_PTR(Log) m_log_ap;
 
 private:
     DISALLOW_COPY_AND_ASSIGN (LogChannel);

Modified: lldb/trunk/include/lldb/Expression/IRMemoryMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/IRMemoryMap.h?rev=179796&r1=179795&r2=179796&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/IRMemoryMap.h (original)
+++ lldb/trunk/include/lldb/Expression/IRMemoryMap.h Thu Apr 18 16:01:59 2013
@@ -84,7 +84,7 @@ private:
         uint32_t        m_permissions;      ///< The access permissions on the memory in the process.  In the host, the memory is always read/write.
         uint8_t         m_alignment;        ///< The alignment of the requested allocation
         
-        std::unique_ptr<DataBufferHeap> m_data;
+        STD_UNIQUE_PTR(DataBufferHeap) m_data;
         
         AllocationPolicy    m_policy;
     };

Modified: lldb/trunk/include/lldb/Expression/Materializer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/Materializer.h?rev=179796&r1=179795&r2=179796&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/Materializer.h (original)
+++ lldb/trunk/include/lldb/Expression/Materializer.h Thu Apr 18 16:01:59 2013
@@ -72,8 +72,8 @@ public:
         lldb::addr_t        m_process_address;
     };
     
-    typedef std::shared_ptr<Dematerializer> DematerializerSP;
-    typedef std::weak_ptr<Dematerializer> DematerializerWP;
+    typedef STD_SHARED_PTR(Dematerializer) DematerializerSP;
+    typedef STD_WEAK_PTR(Dematerializer) DematerializerWP;
     
     DematerializerSP Materialize (lldb::StackFrameSP &frame_sp, lldb::ClangExpressionVariableSP &result_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err);
     
@@ -143,7 +143,7 @@ public:
 private:
     uint32_t AddStructMember (Entity &entity);
     
-    typedef std::unique_ptr<Entity> EntityUP;
+    typedef STD_UNIQUE_PTR(Entity)  EntityUP;
     typedef std::vector<EntityUP>   EntityVector;
     
     unsigned                        m_result_index;

Modified: lldb/trunk/include/lldb/lldb-types.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-types.h?rev=179796&r1=179795&r2=179796&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-types.h (original)
+++ lldb/trunk/include/lldb/lldb-types.h Thu Apr 18 16:01:59 2013
@@ -28,7 +28,6 @@
 //  lldb::thread_arg_t      The type of the one any only thread creation argument for the host system
 //  lldb::thread_result_t   The return type that gets returned when a thread finishes.
 //  lldb::thread_func_t     The function prototype used to spawn a thread on the host system.
-//  lldb::SharedPtr         The template that wraps up the host version of a reference counted pointer (like boost::shared_ptr)
 //  #define LLDB_INVALID_PROCESS_ID ...
 //  #define LLDB_INVALID_THREAD_ID ...
 //  #define LLDB_INVALID_HOST_THREAD ...

Modified: lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp?rev=179796&r1=179795&r2=179796&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp Thu Apr 18 16:01:59 2013
@@ -792,7 +792,7 @@ ABISysV_x86_64::GetReturnValueObjectSimp
                     ProcessSP process_sp (thread.GetProcess());
                     if (process_sp)
                     {
-                        std::unique_ptr<DataBufferHeap> heap_data_ap (new DataBufferHeap(byte_size, 0));
+                        STD_UNIQUE_PTR(DataBufferHeap) heap_data_ap (new DataBufferHeap(byte_size, 0));
                         const ByteOrder byte_order = process_sp->GetByteOrder();
                         RegisterValue reg_value;
                         if (reg_ctx->ReadRegister(altivec_reg, reg_value))

Modified: lldb/trunk/tools/lldb-perf/lib/Gauge.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-perf/lib/Gauge.cpp?rev=179796&r1=179795&r2=179796&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-perf/lib/Gauge.cpp (original)
+++ lldb/trunk/tools/lldb-perf/lib/Gauge.cpp Thu Apr 18 16:01:59 2013
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "Gauge.h"
+#include "lldb/lldb-forward.h"
 
 template <>
 lldb_perf::Results::ResultSP
@@ -15,7 +16,7 @@ lldb_perf::GetResult (const char *descri
 {
     if (description && description[0])
     {
-        std::unique_ptr<Results::Dictionary> value_dict_ap (new Results::Dictionary ());
+        STD_UNIQUE_PTR(Results::Dictionary) value_dict_ap (new Results::Dictionary ());
         value_dict_ap->AddString("description", NULL, description);
         value_dict_ap->AddDouble("value", NULL, value);
         return Results::ResultSP (value_dict_ap.release());
@@ -29,7 +30,7 @@ lldb_perf::GetResult (const char *descri
 {
     if (description && description[0])
     {
-        std::unique_ptr<Results::Dictionary> value_dict_ap (new Results::Dictionary ());
+        STD_UNIQUE_PTR(Results::Dictionary) value_dict_ap (new Results::Dictionary ());
         value_dict_ap->AddString("description", NULL, description);
         value_dict_ap->AddUnsigned("value", NULL, value);
         return Results::ResultSP (value_dict_ap.release());
@@ -43,7 +44,7 @@ lldb_perf::GetResult (const char *descri
 {
     if (description && description[0])
     {
-        std::unique_ptr<Results::Dictionary> value_dict_ap (new Results::Dictionary ());
+        STD_UNIQUE_PTR(Results::Dictionary) value_dict_ap (new Results::Dictionary ());
         value_dict_ap->AddString("description", NULL, description);
         value_dict_ap->AddString("value", NULL, value.c_str());
         return Results::ResultSP (value_dict_ap.release());

Modified: lldb/trunk/tools/lldb-perf/lib/MemoryGauge.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-perf/lib/MemoryGauge.cpp?rev=179796&r1=179795&r2=179796&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-perf/lib/MemoryGauge.cpp (original)
+++ lldb/trunk/tools/lldb-perf/lib/MemoryGauge.cpp Thu Apr 18 16:01:59 2013
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "MemoryGauge.h"
+#include "lldb/lldb-forward.h"
 #include <assert.h>
 #include <cmath>
 #include <mach/mach.h>
@@ -91,7 +92,7 @@ MemoryStats::operator * (const MemorySta
 Results::ResultSP
 MemoryStats::GetResult (const char *name, const char *description) const
 {
-    std::unique_ptr<Results::Dictionary> dict_ap (new Results::Dictionary (name, NULL));
+    STD_UNIQUE_PTR(Results::Dictionary) dict_ap (new Results::Dictionary (name, NULL));
     dict_ap->AddUnsigned("resident", NULL, GetResidentSize());
     dict_ap->AddUnsigned("max_resident", NULL, GetMaxResidentSize());
     return Results::ResultSP(dict_ap.release());

Modified: lldb/trunk/tools/lldb-perf/lib/Results.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-perf/lib/Results.cpp?rev=179796&r1=179795&r2=179796&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-perf/lib/Results.cpp (original)
+++ lldb/trunk/tools/lldb-perf/lib/Results.cpp Thu Apr 18 16:01:59 2013
@@ -182,7 +182,7 @@ Results::Dictionary::AddUnsigned (const
     assert (name && name[0]);
     if (description && description[0])
     {
-        std::unique_ptr<Results::Dictionary> value_dict_ap (new Results::Dictionary ());
+        STD_UNIQUE_PTR(Results::Dictionary) value_dict_ap (new Results::Dictionary ());
         value_dict_ap->AddString("description", NULL, description);
         value_dict_ap->AddUnsigned("value", NULL, value);
         m_dictionary[std::string(name)] = ResultSP (value_dict_ap.release());
@@ -199,7 +199,7 @@ Results::Dictionary::AddDouble (const ch
     
     if (description && description[0])
     {
-        std::unique_ptr<Results::Dictionary> value_dict_ap (new Results::Dictionary ());
+        STD_UNIQUE_PTR(Results::Dictionary) value_dict_ap (new Results::Dictionary ());
         value_dict_ap->AddString("description", NULL, description);
         value_dict_ap->AddDouble("value", NULL, value);
         m_dictionary[std::string(name)] = ResultSP (value_dict_ap.release());
@@ -214,7 +214,7 @@ Results::Dictionary::AddString (const ch
     assert (name && name[0]);
     if (description && description[0])
     {
-        std::unique_ptr<Results::Dictionary> value_dict_ap (new Results::Dictionary ());
+        STD_UNIQUE_PTR(Results::Dictionary) value_dict_ap (new Results::Dictionary ());
         value_dict_ap->AddString("description", NULL, description);
         value_dict_ap->AddString("value", NULL, value);
         m_dictionary[std::string(name)] = ResultSP (value_dict_ap.release());
@@ -230,7 +230,7 @@ Results::Dictionary::Add (const char *na
     assert (name && name[0]);
     if (description && description[0])
     {
-        std::unique_ptr<Results::Dictionary> value_dict_ap (new Results::Dictionary ());
+        STD_UNIQUE_PTR(Results::Dictionary) value_dict_ap (new Results::Dictionary ());
         value_dict_ap->AddString("description", NULL, description);
         value_dict_ap->Add("value", NULL, result_sp);
         m_dictionary[std::string(name)] = ResultSP (value_dict_ap.release());

Modified: lldb/trunk/tools/lldb-perf/lib/Results.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-perf/lib/Results.h?rev=179796&r1=179795&r2=179796&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-perf/lib/Results.h (original)
+++ lldb/trunk/tools/lldb-perf/lib/Results.h Thu Apr 18 16:01:59 2013
@@ -10,7 +10,7 @@
 #ifndef __PerfTestDriver_Results_h__
 #define __PerfTestDriver_Results_h__
 
-#include <memory>
+#include "lldb/lldb-forward.h"
 #include <map>
 #include <string>
 #include <vector>
@@ -123,7 +123,7 @@ public:
         Type m_type;
     };
     
-    typedef std::shared_ptr<Result> ResultSP;
+    typedef STD_SHARED_PTR(Result) ResultSP;
 
     class Array : public Result
     {





More information about the lldb-commits mailing list