<rdar://problem/10434005>

Prepare LLDB to be built with C++11 by hiding all accesses to std::tr1 behind
macros that allows us to easily compile for either C++.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152698 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBTypeCategory.cpp b/source/API/SBTypeCategory.cpp
index 60d9ac1..aad36f7 100644
--- a/source/API/SBTypeCategory.cpp
+++ b/source/API/SBTypeCategory.cpp
@@ -167,7 +167,7 @@
     if (!children_sp)
         return lldb::SBTypeFilter();
     
-    TypeFilterImplSP filter_sp = std::tr1::static_pointer_cast<TypeFilterImpl>(children_sp);
+    TypeFilterImplSP filter_sp = STD_STATIC_POINTER_CAST(TypeFilterImpl,children_sp);
     
     return lldb::SBTypeFilter(filter_sp);
 
@@ -231,7 +231,7 @@
     if (!children_sp)
         return lldb::SBTypeSynthetic();
     
-    TypeSyntheticImplSP synth_sp = std::tr1::static_pointer_cast<TypeSyntheticImpl>(children_sp);
+    TypeSyntheticImplSP synth_sp = STD_STATIC_POINTER_CAST(TypeSyntheticImpl,children_sp);
     
     return lldb::SBTypeSynthetic(synth_sp);
 }
@@ -248,7 +248,7 @@
     if (!children_sp.get())
         return lldb::SBTypeFilter();
     
-    TypeFilterImplSP filter_sp = std::tr1::static_pointer_cast<TypeFilterImpl>(children_sp);
+    TypeFilterImplSP filter_sp = STD_STATIC_POINTER_CAST(TypeFilterImpl,children_sp);
     
     return lldb::SBTypeFilter(filter_sp);
 }
@@ -283,7 +283,7 @@
     if (!children_sp.get())
         return lldb::SBTypeSynthetic();
     
-    TypeSyntheticImplSP synth_sp = std::tr1::static_pointer_cast<TypeSyntheticImpl>(children_sp);
+    TypeSyntheticImplSP synth_sp = STD_STATIC_POINTER_CAST(TypeSyntheticImpl,children_sp);
     
     return lldb::SBTypeSynthetic(synth_sp);
 }
diff --git a/source/API/SBValue.cpp b/source/API/SBValue.cpp
index fa2fa77..c3d966f 100644
--- a/source/API/SBValue.cpp
+++ b/source/API/SBValue.cpp
@@ -442,7 +442,7 @@
                 
                 if (synthetic_sp && !synthetic_sp->IsScripted())
                 {
-                    TypeFilterImplSP filter_sp = std::tr1::static_pointer_cast<TypeFilterImpl>(synthetic_sp);
+                    TypeFilterImplSP filter_sp = STD_STATIC_POINTER_CAST(TypeFilterImpl,synthetic_sp);
                     filter.SetSP(filter_sp);
                 }
             }
@@ -469,7 +469,7 @@
                 
                 if (children_sp && children_sp->IsScripted())
                 {
-                    TypeSyntheticImplSP synth_sp = std::tr1::static_pointer_cast<TypeSyntheticImpl>(children_sp);
+                    TypeSyntheticImplSP synth_sp = STD_STATIC_POINTER_CAST(TypeSyntheticImpl,children_sp);
                     synthetic.SetSP(synth_sp);
                 }
             }
diff --git a/source/Commands/CommandObjectType.cpp b/source/Commands/CommandObjectType.cpp
index 0de6d9b..2297138 100644
--- a/source/Commands/CommandObjectType.cpp
+++ b/source/Commands/CommandObjectType.cpp
@@ -59,7 +59,7 @@
     {
     }
     
-    typedef SHARED_PTR(ScriptAddOptions) SharedPointer;
+    typedef STD_SHARED_PTR(ScriptAddOptions) SharedPointer;
     
 };
 
@@ -92,7 +92,7 @@
     {
     }
     
-    typedef SHARED_PTR(SynthAddOptions) SharedPointer;
+    typedef STD_SHARED_PTR(SynthAddOptions) SharedPointer;
     
 };
 
diff --git a/source/Expression/IRInterpreter.cpp b/source/Expression/IRInterpreter.cpp
index 514db9d..2deb87a 100644
--- a/source/Expression/IRInterpreter.cpp
+++ b/source/Expression/IRInterpreter.cpp
@@ -70,8 +70,8 @@
     return s;
 }
 
-typedef SHARED_PTR(lldb_private::DataEncoder) DataEncoderSP;
-typedef SHARED_PTR(lldb_private::DataExtractor) DataExtractorSP;
+typedef STD_SHARED_PTR(lldb_private::DataEncoder) DataEncoderSP;
+typedef STD_SHARED_PTR(lldb_private::DataExtractor) DataExtractorSP;
 
 class Memory
 {
@@ -128,7 +128,7 @@
         }
     };
     
-    typedef SHARED_PTR(Allocation)  AllocationSP;
+    typedef STD_SHARED_PTR(Allocation)  AllocationSP;
     
     struct Region
     {
diff --git a/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h b/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
index a072119..3e89307 100644
--- a/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
+++ b/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
@@ -118,7 +118,7 @@
     class Archive
     {
     public:
-        typedef SHARED_PTR(Archive) shared_ptr;
+        typedef STD_SHARED_PTR(Archive) shared_ptr;
         typedef std::multimap<lldb_private::FileSpec, shared_ptr> Map;
 
         static Map &
diff --git a/source/Plugins/Process/Utility/RegisterContextLLDB.h b/source/Plugins/Process/Utility/RegisterContextLLDB.h
index cdb0ccb..3a7aa67 100644
--- a/source/Plugins/Process/Utility/RegisterContextLLDB.h
+++ b/source/Plugins/Process/Utility/RegisterContextLLDB.h
@@ -25,7 +25,7 @@
 class RegisterContextLLDB : public lldb_private::RegisterContext
 {
 public:
-    typedef SHARED_PTR(RegisterContextLLDB) SharedPtr;
+    typedef STD_SHARED_PTR(RegisterContextLLDB) SharedPtr;
 
     RegisterContextLLDB (lldb_private::Thread &thread,
                          const SharedPtr& next_frame,
diff --git a/source/Plugins/Process/Utility/UnwindLLDB.h b/source/Plugins/Process/Utility/UnwindLLDB.h
index ff4030f..7d1c8a1 100644
--- a/source/Plugins/Process/Utility/UnwindLLDB.h
+++ b/source/Plugins/Process/Utility/UnwindLLDB.h
@@ -70,7 +70,7 @@
     lldb::RegisterContextSP
     DoCreateRegisterContextForFrame (lldb_private::StackFrame *frame);
 
-    typedef SHARED_PTR(RegisterContextLLDB) RegisterContextLLDBSP;
+    typedef STD_SHARED_PTR(RegisterContextLLDB) RegisterContextLLDBSP;
 
     // Needed to retrieve the "next" frame (e.g. frame 2 needs to retrieve frame 1's RegisterContextLLDB)
     // The RegisterContext for frame_num must already exist or this returns an empty shared pointer.
@@ -97,7 +97,7 @@
         DISALLOW_COPY_AND_ASSIGN (Cursor);
     };
 
-    typedef SHARED_PTR(Cursor) CursorSP;
+    typedef STD_SHARED_PTR(Cursor) CursorSP;
     std::vector<CursorSP> m_frames;
     bool m_unwind_complete; // If this is true, we've enumerated all the frames in the stack, and m_frames.size() is the 
                             // number of frames, etc.  Otherwise we've only gone as far as directly asked, and m_frames.size()
diff --git a/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h b/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
index f4ee96b..caa5585 100644
--- a/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
+++ b/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
@@ -21,7 +21,7 @@
 typedef CStringToDIEMap::iterator CStringToDIEMapIter;
 typedef CStringToDIEMap::const_iterator CStringToDIEMapConstIter;
 
-typedef SHARED_PTR(DWARFCompileUnit) DWARFCompileUnitSP;
+typedef STD_SHARED_PTR(DWARFCompileUnit) DWARFCompileUnitSP;
 
 class DWARFDebugInfo
 {
diff --git a/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h b/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h
index 843d081..b10c2c4 100644
--- a/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h
+++ b/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h
@@ -68,7 +68,7 @@
         {
         }
 
-        typedef SHARED_PTR(Prologue) shared_ptr;
+        typedef STD_SHARED_PTR(Prologue) shared_ptr;
 
         uint32_t    total_length;   // The size in bytes of the statement information for this compilation unit (not including the total_length field itself).
         uint16_t    version;        // Version identifier for the statement information format.
@@ -135,7 +135,7 @@
     //------------------------------------------------------------------
     struct LineTable
     {
-        typedef SHARED_PTR(LineTable) shared_ptr;
+        typedef STD_SHARED_PTR(LineTable) shared_ptr;
 
         LineTable() :
             prologue(),
diff --git a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
index b82062b..d825943 100644
--- a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
+++ b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
@@ -141,7 +141,7 @@
         lldb_private::SymbolVendor *oso_symbol_vendor;
         std::vector<uint32_t> function_indexes;
         std::vector<uint32_t> static_indexes;
-        SHARED_PTR(lldb_private::SectionList) debug_map_sections_sp;
+        STD_SHARED_PTR(lldb_private::SectionList) debug_map_sections_sp;
 
         CompileUnitInfo() :
             so_file (),