[Lldb-commits] [lldb] r246871 - This patch separates the generic portion of ClangExpressionVariable, which

Sean Callanan via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 4 13:49:52 PDT 2015


Author: spyffe
Date: Fri Sep  4 15:49:51 2015
New Revision: 246871

URL: http://llvm.org/viewvc/llvm-project?rev=246871&view=rev
Log:
This patch separates the generic portion of ClangExpressionVariable, which
stores information about a variable that different parts of LLDB use, from the
compiler-specific portion that only the expression parser cares about.

http://reviews.llvm.org/D12602

Modified:
    lldb/trunk/include/lldb/Core/ValueObject.h
    lldb/trunk/include/lldb/Expression/ClangExpressionDeclMap.h
    lldb/trunk/include/lldb/Expression/ClangFunction.h
    lldb/trunk/include/lldb/Expression/ClangPersistentVariables.h
    lldb/trunk/include/lldb/Expression/ClangUserExpression.h
    lldb/trunk/include/lldb/Expression/ClangUtilityFunction.h
    lldb/trunk/include/lldb/Expression/ExpressionVariable.h
    lldb/trunk/include/lldb/Expression/Materializer.h
    lldb/trunk/include/lldb/Target/StopInfo.h
    lldb/trunk/include/lldb/Target/Thread.h
    lldb/trunk/include/lldb/Target/ThreadPlan.h
    lldb/trunk/include/lldb/Target/ThreadPlanCallUserExpression.h
    lldb/trunk/include/lldb/lldb-forward.h
    lldb/trunk/lldb.xcodeproj/project.pbxproj
    lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme
    lldb/trunk/source/API/SBFrame.cpp
    lldb/trunk/source/Breakpoint/BreakpointLocation.cpp
    lldb/trunk/source/Core/FormatEntity.cpp
    lldb/trunk/source/Core/ValueObject.cpp
    lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
    lldb/trunk/source/Expression/ClangPersistentVariables.cpp
    lldb/trunk/source/Expression/ClangUserExpression.cpp
    lldb/trunk/source/Expression/ExpressionVariable.cpp
    lldb/trunk/source/Expression/Materializer.cpp
    lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp
    lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h
    lldb/trunk/source/Target/ABI.cpp
    lldb/trunk/source/Target/StopInfo.cpp
    lldb/trunk/source/Target/Target.cpp
    lldb/trunk/source/Target/Thread.cpp

Modified: lldb/trunk/include/lldb/Core/ValueObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObject.h?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObject.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObject.h Fri Sep  4 15:49:51 2015
@@ -1139,7 +1139,7 @@ protected:
     
     friend class ValueObjectChild;
     friend class ClangExpressionDeclMap;  // For GetValue
-    friend class ClangExpressionVariable; // For SetName
+    friend class ExpressionVariable;      // For SetName
     friend class Target;                  // For SetName
     friend class ValueObjectConstResultImpl;
     friend class ValueObjectSynthetic;    // For ClearUserVisibleData

Modified: lldb/trunk/include/lldb/Expression/ClangExpressionDeclMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ClangExpressionDeclMap.h?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ClangExpressionDeclMap.h (original)
+++ lldb/trunk/include/lldb/Expression/ClangExpressionDeclMap.h Fri Sep  4 15:49:51 2015
@@ -387,9 +387,9 @@ public:
                               CompilerDeclContext &namespace_decl,
                               unsigned int current_id);
 private:
-    ClangExpressionVariableList    m_found_entities;           ///< All entities that were looked up for the parser.
-    ClangExpressionVariableList    m_struct_members;           ///< All entities that need to be placed in the struct.
-    bool                           m_keep_result_in_memory;    ///< True if result persistent variables generated by this expression should stay in memory.
+    ExpressionVariableList      m_found_entities;           ///< All entities that were looked up for the parser.
+    ExpressionVariableList      m_struct_members;           ///< All entities that need to be placed in the struct.
+    bool                        m_keep_result_in_memory;    ///< True if result persistent variables generated by this expression should stay in memory.
     
     //----------------------------------------------------------------------
     /// The following values should not live beyond parsing
@@ -615,7 +615,7 @@ private:
     //------------------------------------------------------------------
     void 
     AddOneVariable (NameSearchContext &context, 
-                    lldb::ClangExpressionVariableSP &pvar_sp,
+                    lldb::ExpressionVariableSP &pvar_sp,
                     unsigned int current_id);
     
     //------------------------------------------------------------------

Modified: lldb/trunk/include/lldb/Expression/ClangFunction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ClangFunction.h?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ClangFunction.h (original)
+++ lldb/trunk/include/lldb/Expression/ClangFunction.h Fri Sep  4 15:49:51 2015
@@ -364,7 +364,7 @@ public:
     /// Return the object that the parser should use when registering
     /// local variables.  May be NULL if the Expression doesn't care.
     //------------------------------------------------------------------
-    ClangExpressionVariableList *
+    ExpressionVariableList *
     LocalVariables ()
     {
         return NULL;

Modified: lldb/trunk/include/lldb/Expression/ClangPersistentVariables.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ClangPersistentVariables.h?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ClangPersistentVariables.h (original)
+++ lldb/trunk/include/lldb/Expression/ClangPersistentVariables.h Fri Sep  4 15:49:51 2015
@@ -26,7 +26,7 @@ namespace lldb_private
 /// ClangPersistentVariable for more discussion.  Also provides an increasing,
 /// 0-based counter for naming result variables.
 //----------------------------------------------------------------------
-class ClangPersistentVariables : public ClangExpressionVariableList
+class ClangPersistentVariables : public ExpressionVariableList
 {
 public:
     
@@ -35,10 +35,10 @@ public:
     //----------------------------------------------------------------------
     ClangPersistentVariables ();
 
-    lldb::ClangExpressionVariableSP
+    lldb::ExpressionVariableSP
     CreatePersistentVariable (const lldb::ValueObjectSP &valobj_sp);
 
-    lldb::ClangExpressionVariableSP
+    ClangExpressionVariable *
     CreatePersistentVariable (ExecutionContextScope *exe_scope,
                               const ConstString &name, 
                               const TypeFromUser& user_type, 
@@ -56,7 +56,7 @@ public:
     GetNextPersistentVariableName ();
     
     void
-    RemovePersistentVariable (lldb::ClangExpressionVariableSP variable);
+    RemovePersistentVariable (lldb::ExpressionVariableSP variable);
 
     void
     RegisterPersistentType (const ConstString &name,

Modified: lldb/trunk/include/lldb/Expression/ClangUserExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ClangUserExpression.h?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ClangUserExpression.h (original)
+++ lldb/trunk/include/lldb/Expression/ClangUserExpression.h Fri Sep  4 15:49:51 2015
@@ -145,7 +145,7 @@ public:
              ExecutionContext &exe_ctx,
              const EvaluateExpressionOptions& options,
              lldb::ClangUserExpressionSP &shared_ptr_to_me,
-             lldb::ClangExpressionVariableSP &result);
+             lldb::ExpressionVariableSP &result);
 
     //------------------------------------------------------------------
     /// Apply the side effects of the function to program state.
@@ -173,7 +173,7 @@ public:
     bool
     FinalizeJITExecution (Stream &error_stream,
                           ExecutionContext &exe_ctx,
-                          lldb::ClangExpressionVariableSP &result,
+                          lldb::ExpressionVariableSP &result,
                           lldb::addr_t function_stack_bottom = LLDB_INVALID_ADDRESS,
                           lldb::addr_t function_stack_top = LLDB_INVALID_ADDRESS);
 

Modified: lldb/trunk/include/lldb/Expression/ClangUtilityFunction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ClangUtilityFunction.h?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ClangUtilityFunction.h (original)
+++ lldb/trunk/include/lldb/Expression/ClangUtilityFunction.h Fri Sep  4 15:49:51 2015
@@ -125,7 +125,7 @@ public:
     /// Return the object that the parser should use when registering
     /// local variables.  May be NULL if the Expression doesn't care.
     //------------------------------------------------------------------
-    ClangExpressionVariableList *
+    ExpressionVariableList *
     LocalVariables ()
     {
         return NULL;

Modified: lldb/trunk/include/lldb/Expression/ExpressionVariable.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ExpressionVariable.h?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ExpressionVariable.h (original)
+++ lldb/trunk/include/lldb/Expression/ExpressionVariable.h Fri Sep  4 15:49:51 2015
@@ -10,5 +10,247 @@
 #ifndef liblldb_ExpressionVariable_h_
 #define liblldb_ExpressionVariable_h_
 
+// C Includes
+#include <signal.h>
+#include <stdint.h>
+#include <string.h>
+
+// C++ Includes
+#include <vector>
+
+// Other libraries and framework includes
+// Project includes
+#include "lldb/lldb-public.h"
+#include "lldb/Core/ConstString.h"
+#include "lldb/Core/ValueObject.h"
+
+namespace lldb_private
+{
+    
+class ClangExpressionVariable;
+
+class ExpressionVariable :
+    public std::enable_shared_from_this<ExpressionVariable>
+{
+public:
+    size_t
+    GetByteSize ()
+    {
+        return m_frozen_sp->GetByteSize();
+    }
+    
+    const ConstString &
+    GetName ()
+    {
+        return m_frozen_sp->GetName();
+    }
+    
+    lldb::ValueObjectSP
+    GetValueObject()
+    {
+        return m_frozen_sp;
+    }
+    
+    virtual ClangExpressionVariable *AsClangExpressionVariable() {
+        return nullptr;
+    }
+    
+    uint8_t *GetValueBytes();
+    
+    void
+    ValueUpdated ()
+    {
+        m_frozen_sp->ValueUpdated ();
+    }
+    
+    RegisterInfo *
+    GetRegisterInfo()
+    {
+        return m_frozen_sp->GetValue().GetRegisterInfo();
+    }
+    
+    void
+    SetRegisterInfo (const RegisterInfo *reg_info)
+    {
+        return m_frozen_sp->GetValue().SetContext (Value::eContextTypeRegisterInfo, const_cast<RegisterInfo *>(reg_info));
+    }
+    
+    CompilerType
+    GetCompilerType()
+    {
+        return m_frozen_sp->GetCompilerType();
+    }
+    
+    void
+    SetCompilerType(const CompilerType &clang_type)
+    {
+        m_frozen_sp->GetValue().SetCompilerType(clang_type);
+    }
+    
+    void
+    SetName (const ConstString &name)
+    {
+        m_frozen_sp->SetName (name);
+    }
+    
+    // this function is used to copy the address-of m_live_sp into m_frozen_sp
+    // this is necessary because the results of certain cast and pointer-arithmetic
+    // operations (such as those described in bugzilla issues 11588 and 11618) generate
+    // frozen objects that do not have a valid address-of, which can be troublesome when
+    // using synthetic children providers. Transferring the address-of the live object
+    // solves these issues and provides the expected user-level behavior
+    void
+    TransferAddress (bool force = false)
+    {
+        if (m_live_sp.get() == NULL)
+            return;
+        
+        if (m_frozen_sp.get() == NULL)
+            return;
+        
+        if (force || (m_frozen_sp->GetLiveAddress() == LLDB_INVALID_ADDRESS))
+            m_frozen_sp->SetLiveAddress(m_live_sp->GetLiveAddress());
+    }
+    
+    virtual ~ExpressionVariable();
+
+    enum Flags
+    {
+        EVNone                  = 0,
+        EVIsLLDBAllocated       = 1 << 0,   ///< This variable is resident in a location specifically allocated for it by LLDB in the target process
+        EVIsProgramReference    = 1 << 1,   ///< This variable is a reference to a (possibly invalid) area managed by the target program
+        EVNeedsAllocation       = 1 << 2,   ///< Space for this variable has yet to be allocated in the target process
+        EVIsFreezeDried         = 1 << 3,   ///< This variable's authoritative version is in m_frozen_sp (for example, for statically-computed results)
+        EVNeedsFreezeDry        = 1 << 4,   ///< Copy from m_live_sp to m_frozen_sp during dematerialization
+        EVKeepInTarget          = 1 << 5,   ///< Keep the allocation after the expression is complete rather than freeze drying its contents and freeing it
+        EVTypeIsReference       = 1 << 6,   ///< The original type of this variable is a reference, so materialize the value rather than the location
+        EVUnknownType           = 1 << 7,   ///< This is a symbol of unknown type, and the type must be resolved after parsing is complete
+        EVBareRegister          = 1 << 8    ///< This variable is a direct reference to $pc or some other entity.
+    };
+    
+    typedef uint16_t FlagType;
+    
+    FlagType m_flags; // takes elements of Flags
+
+    // these should be private
+    lldb::ValueObjectSP m_frozen_sp;
+    lldb::ValueObjectSP m_live_sp;
+};
+    
+//----------------------------------------------------------------------
+/// @class ExpressionVariableList ExpressionVariable.h "lldb/Expression/ExpressionVariable.h"
+/// @brief A list of variable references.
+///
+/// This class stores variables internally, acting as the permanent store.
+//----------------------------------------------------------------------
+class ExpressionVariableList
+{
+public:
+    //----------------------------------------------------------------------
+    /// Implementation of methods in ExpressionVariableListBase
+    //----------------------------------------------------------------------
+    size_t 
+    GetSize()
+    {
+        return m_variables.size();
+    }
+    
+    lldb::ExpressionVariableSP
+    GetVariableAtIndex(size_t index)
+    {
+        lldb::ExpressionVariableSP var_sp;
+        if (index < m_variables.size())
+            var_sp = m_variables[index];
+        return var_sp;
+    }
+    
+    size_t
+    AddVariable (const lldb::ExpressionVariableSP &var_sp)
+    {
+        m_variables.push_back(var_sp);
+        return m_variables.size() - 1;
+    }
+
+    bool
+    ContainsVariable (const lldb::ExpressionVariableSP &var_sp)
+    {
+        const size_t size = m_variables.size();
+        for (size_t index = 0; index < size; ++index)
+        {
+            if (m_variables[index].get() == var_sp.get())
+                return true;
+        }
+        return false;
+    }
+
+    //----------------------------------------------------------------------
+    /// Finds a variable by name in the list.
+    ///
+    /// @param[in] name
+    ///     The name of the requested variable.
+    ///
+    /// @return
+    ///     The variable requested, or NULL if that variable is not in the list.
+    //----------------------------------------------------------------------
+    lldb::ExpressionVariableSP
+    GetVariable (const ConstString &name)
+    {
+        lldb::ExpressionVariableSP var_sp;
+        for (size_t index = 0, size = GetSize(); index < size; ++index)
+        {
+            var_sp = GetVariableAtIndex(index);
+            if (var_sp->GetName() == name)
+                return var_sp;
+        }
+        var_sp.reset();
+        return var_sp;
+    }
+
+    lldb::ExpressionVariableSP
+    GetVariable (const char *name)
+    {
+        lldb::ExpressionVariableSP var_sp;
+        if (name && name[0])
+        {
+            for (size_t index = 0, size = GetSize(); index < size; ++index)
+            {
+                var_sp = GetVariableAtIndex(index);
+                const char *var_name_cstr = var_sp->GetName().GetCString();
+                if (!var_name_cstr || !name)
+                    continue;
+                if (::strcmp (var_name_cstr, name) == 0)
+                    return var_sp;
+            }
+            var_sp.reset();
+        }
+        return var_sp;
+    }
+    
+    void
+    RemoveVariable (lldb::ExpressionVariableSP var_sp)
+    {
+        for (std::vector<lldb::ExpressionVariableSP>::iterator vi = m_variables.begin(), ve = m_variables.end();
+             vi != ve;
+             ++vi)
+        {
+            if (vi->get() == var_sp.get())
+            {
+                m_variables.erase(vi);
+                return;
+            }
+        }
+    }
+    
+    void
+    Clear()
+    {
+        m_variables.clear();
+    }
+
+private:
+    std::vector <lldb::ExpressionVariableSP> m_variables;
+};
+    
+}
 
 #endif /* liblldb_ExpressionVariable_h_ */

Modified: lldb/trunk/include/lldb/Expression/Materializer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/Materializer.h?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/Materializer.h (original)
+++ lldb/trunk/include/lldb/Expression/Materializer.h Fri Sep  4 15:49:51 2015
@@ -44,7 +44,7 @@ public:
         }
         
         void Dematerialize (Error &err,
-                            lldb::ClangExpressionVariableSP &result_sp,
+                            lldb::ExpressionVariableSP &result_sp,
                             lldb::addr_t frame_top,
                             lldb::addr_t frame_bottom);
         
@@ -84,7 +84,7 @@ public:
     
     DematerializerSP Materialize (lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err);
     
-    uint32_t AddPersistentVariable (lldb::ClangExpressionVariableSP &persistent_variable_sp, Error &err);
+    uint32_t AddPersistentVariable (lldb::ExpressionVariableSP &persistent_variable_sp, Error &err);
     uint32_t AddVariable (lldb::VariableSP &variable_sp, Error &err);
     uint32_t AddResultVariable (const TypeFromUser &type, bool is_lvalue, bool keep_in_memory, Error &err);
     uint32_t AddSymbol (const Symbol &symbol_sp, Error &err);

Modified: lldb/trunk/include/lldb/Target/StopInfo.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/StopInfo.h?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/StopInfo.h (original)
+++ lldb/trunk/include/lldb/Target/StopInfo.h Fri Sep  4 15:49:51 2015
@@ -172,7 +172,7 @@ public:
     static lldb::StopInfoSP
     CreateStopReasonWithPlan (lldb::ThreadPlanSP &plan,
                               lldb::ValueObjectSP return_valobj_sp,
-                              lldb::ClangExpressionVariableSP expression_variable_sp);
+                              lldb::ExpressionVariableSP expression_variable_sp);
 
     static lldb::StopInfoSP
     CreateStopReasonWithException (Thread &thread, const char *description);
@@ -183,7 +183,7 @@ public:
     static lldb::ValueObjectSP
     GetReturnValueObject (lldb::StopInfoSP &stop_info_sp);
 
-    static lldb::ClangExpressionVariableSP
+    static lldb::ExpressionVariableSP
     GetExpressionVariable (lldb::StopInfoSP &stop_info_sp);
 
 protected:

Modified: lldb/trunk/include/lldb/Target/Thread.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Thread.h?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Thread.h (original)
+++ lldb/trunk/include/lldb/Target/Thread.h Fri Sep  4 15:49:51 2015
@@ -988,11 +988,11 @@ public:
     /// Gets the outer-most expression variable from the completed plans
     ///
     /// @return
-    ///     A ClangExpressionVariableSP, either empty if there is no
+    ///     A ExpressionVariableSP, either empty if there is no
     ///     plan completed an expression during the current stop
     ///     or the expression variable that was made for the completed expression.
     //------------------------------------------------------------------
-    lldb::ClangExpressionVariableSP
+    lldb::ExpressionVariableSP
     GetExpressionVariable ();
 
     //------------------------------------------------------------------

Modified: lldb/trunk/include/lldb/Target/ThreadPlan.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlan.h?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlan.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlan.h Fri Sep  4 15:49:51 2015
@@ -519,10 +519,10 @@ public:
     // the user regained control at that point) a subsequent process control command step/continue/etc. might
     // complete the expression evaluations.  If so, the result of the expression evaluation will show up here.
     
-    virtual lldb::ClangExpressionVariableSP
+    virtual lldb::ExpressionVariableSP
     GetExpressionVariable ()
     {
-        return lldb::ClangExpressionVariableSP();
+        return lldb::ExpressionVariableSP();
     }
     
     // If a thread plan stores the state before it was run, then you might

Modified: lldb/trunk/include/lldb/Target/ThreadPlanCallUserExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanCallUserExpression.h?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanCallUserExpression.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanCallUserExpression.h Fri Sep  4 15:49:51 2015
@@ -52,7 +52,7 @@ public:
         m_manage_materialization = true;
     }
     
-    lldb::ClangExpressionVariableSP
+    lldb::ExpressionVariableSP
     GetExpressionVariable() override
     {
         return m_result_var_sp;
@@ -64,7 +64,7 @@ private:
                                                          // User expression the initiated this ThreadPlan
                                                          // lives as long as the thread plan does.
     bool m_manage_materialization = false;
-    lldb::ClangExpressionVariableSP m_result_var_sp;     // If we are left to manage the materialization,
+    lldb::ExpressionVariableSP m_result_var_sp;     // If we are left to manage the materialization,
                                                          // then stuff the result expression variable here.
 
     DISALLOW_COPY_AND_ASSIGN (ThreadPlanCallUserExpression);

Modified: lldb/trunk/include/lldb/lldb-forward.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-forward.h?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-forward.h (original)
+++ lldb/trunk/include/lldb/lldb-forward.h Fri Sep  4 15:49:51 2015
@@ -52,8 +52,6 @@ class   ClangExpression;
 class   ClangExpressionDeclMap;
 class   ClangExpressionParser;
 class   ClangExpressionVariable;
-class   ClangExpressionVariableList;
-class   ClangExpressionVariableList;
 class   ClangExpressionVariables;
 class   ClangFunction;
 class   ClangModulesDeclVendor;
@@ -95,6 +93,8 @@ class   ExecutionContext;
 class   ExecutionContextRef;
 class   ExecutionContextRefLocker;
 class   ExecutionContextScope;
+class   ExpressionVariable;
+class   ExpressionVariableList;
 class   File;
 class   FileSpec;
 class   FileSpecList;
@@ -305,7 +305,6 @@ namespace lldb {
     typedef std::unique_ptr<lldb_private::ClangASTContext> ClangASTContextUP;
     typedef std::unique_ptr<lldb_private::ClangASTImporter> ClangASTImporterUP;
     typedef std::unique_ptr<lldb_private::ClangASTSource> ClangASTSourceUP;
-    typedef std::shared_ptr<lldb_private::ClangExpressionVariable> ClangExpressionVariableSP;
     typedef std::unique_ptr<lldb_private::ClangModulesDeclVendor> ClangModulesDeclVendorUP;
     typedef std::unique_ptr<lldb_private::ClangPersistentVariables> ClangPersistentVariablesUP;
     typedef std::shared_ptr<lldb_private::ClangUserExpression> ClangUserExpressionSP;
@@ -323,6 +322,7 @@ namespace lldb {
     typedef std::unique_ptr<lldb_private::DynamicLoader> DynamicLoaderUP;
     typedef std::shared_ptr<lldb_private::Event> EventSP;
     typedef std::shared_ptr<lldb_private::ExecutionContextRef> ExecutionContextRefSP;
+    typedef std::shared_ptr<lldb_private::ExpressionVariable> ExpressionVariableSP;
     typedef std::shared_ptr<lldb_private::File> FileSP;
     typedef std::shared_ptr<lldb_private::Function> FunctionSP;
     typedef std::shared_ptr<lldb_private::FuncUnwinders> FuncUnwindersSP;

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Sep  4 15:49:51 2015
@@ -1393,7 +1393,7 @@
 		263E949D13661AE400E7D1CE /* UnwindAssembly-x86.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = "UnwindAssembly-x86.cpp"; sourceTree = "<group>"; };
 		263E949E13661AE400E7D1CE /* UnwindAssembly-x86.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UnwindAssembly-x86.h"; sourceTree = "<group>"; };
 		263FDE5D1A799F2D00E68013 /* FormatEntity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FormatEntity.h; path = include/lldb/Core/FormatEntity.h; sourceTree = "<group>"; };
-		263FDE5F1A79A01500E68013 /* FormatEntity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FormatEntity.cpp; path = source/Core/FormatEntity.cpp; sourceTree = "<group>"; };
+		263FDE5F1A79A01500E68013 /* FormatEntity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; name = FormatEntity.cpp; path = source/Core/FormatEntity.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
 		263FEDA5112CC1DA00E4C208 /* ThreadSafeSTLMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadSafeSTLMap.h; path = include/lldb/Core/ThreadSafeSTLMap.h; sourceTree = "<group>"; };
 		2640E19E15DC78FD00F23B50 /* Property.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Property.cpp; path = source/Interpreter/Property.cpp; sourceTree = "<group>"; };
 		26424E3C125986CB0016D82C /* ValueObjectConstResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectConstResult.cpp; path = source/Core/ValueObjectConstResult.cpp; sourceTree = "<group>"; };
@@ -1920,7 +1920,7 @@
 		26BC7E1810F1B83100F91463 /* Watchpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Watchpoint.cpp; path = source/Breakpoint/Watchpoint.cpp; sourceTree = "<group>"; };
 		26BC7E2D10F1B84700F91463 /* CommandObjectBreakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectBreakpoint.cpp; path = source/Commands/CommandObjectBreakpoint.cpp; sourceTree = "<group>"; };
 		26BC7E3010F1B84700F91463 /* CommandObjectDisassemble.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectDisassemble.cpp; path = source/Commands/CommandObjectDisassemble.cpp; sourceTree = "<group>"; };
-		26BC7E3110F1B84700F91463 /* CommandObjectExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectExpression.cpp; path = source/Commands/CommandObjectExpression.cpp; sourceTree = "<group>"; };
+		26BC7E3110F1B84700F91463 /* CommandObjectExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; name = CommandObjectExpression.cpp; path = source/Commands/CommandObjectExpression.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
 		26BC7E3310F1B84700F91463 /* CommandObjectHelp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectHelp.cpp; path = source/Commands/CommandObjectHelp.cpp; sourceTree = "<group>"; };
 		26BC7E3610F1B84700F91463 /* CommandObjectMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectMemory.cpp; path = source/Commands/CommandObjectMemory.cpp; sourceTree = "<group>"; };
 		26BC7E3810F1B84700F91463 /* CommandObjectProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectProcess.cpp; path = source/Commands/CommandObjectProcess.cpp; sourceTree = "<group>"; };
@@ -1967,13 +1967,13 @@
 		26BC7E9610F1B85900F91463 /* Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Timer.cpp; path = source/Core/Timer.cpp; sourceTree = "<group>"; };
 		26BC7E9810F1B85900F91463 /* UserID.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UserID.cpp; path = source/Core/UserID.cpp; sourceTree = "<group>"; };
 		26BC7E9910F1B85900F91463 /* Value.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Value.cpp; path = source/Core/Value.cpp; sourceTree = "<group>"; };
-		26BC7E9A10F1B85900F91463 /* ValueObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObject.cpp; path = source/Core/ValueObject.cpp; sourceTree = "<group>"; };
+		26BC7E9A10F1B85900F91463 /* ValueObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; name = ValueObject.cpp; path = source/Core/ValueObject.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
 		26BC7E9B10F1B85900F91463 /* ValueObjectChild.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectChild.cpp; path = source/Core/ValueObjectChild.cpp; sourceTree = "<group>"; };
 		26BC7E9C10F1B85900F91463 /* ValueObjectList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectList.cpp; path = source/Core/ValueObjectList.cpp; sourceTree = "<group>"; };
 		26BC7E9D10F1B85900F91463 /* ValueObjectVariable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectVariable.cpp; path = source/Core/ValueObjectVariable.cpp; sourceTree = "<group>"; };
 		26BC7E9E10F1B85900F91463 /* VMRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VMRange.cpp; path = source/Core/VMRange.cpp; sourceTree = "<group>"; };
 		26BC7ED510F1B86700F91463 /* ClangUserExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangUserExpression.cpp; path = source/Expression/ClangUserExpression.cpp; sourceTree = "<group>"; };
-		26BC7ED810F1B86700F91463 /* DWARFExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DWARFExpression.cpp; path = source/Expression/DWARFExpression.cpp; sourceTree = "<group>"; };
+		26BC7ED810F1B86700F91463 /* DWARFExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; name = DWARFExpression.cpp; path = source/Expression/DWARFExpression.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
 		26BC7EE810F1B88F00F91463 /* Host.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = Host.mm; path = source/Host/macosx/Host.mm; sourceTree = "<group>"; };
 		26BC7EED10F1B8AD00F91463 /* CFCBundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CFCBundle.cpp; path = source/Host/macosx/cfcpp/CFCBundle.cpp; sourceTree = "<group>"; };
 		26BC7EEE10F1B8AD00F91463 /* CFCBundle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFCBundle.h; path = source/Host/macosx/cfcpp/CFCBundle.h; sourceTree = "<group>"; };
@@ -2238,7 +2238,7 @@
 		4906FD4412F2257600A2A77C /* ASTDumper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTDumper.h; path = include/lldb/Expression/ASTDumper.h; sourceTree = "<group>"; };
 		490A36BD180F0E6F00BA31F8 /* PlatformWindows.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformWindows.cpp; sourceTree = "<group>"; };
 		490A36BE180F0E6F00BA31F8 /* PlatformWindows.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformWindows.h; sourceTree = "<group>"; };
-		4911934B1226383D00578B7F /* ASTStructExtractor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTStructExtractor.h; path = include/lldb/Expression/ASTStructExtractor.h; sourceTree = "<group>"; };
+		4911934B1226383D00578B7F /* ASTStructExtractor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = ASTStructExtractor.h; path = include/lldb/Expression/ASTStructExtractor.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
 		491193501226386000578B7F /* ASTStructExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ASTStructExtractor.cpp; path = source/Expression/ASTStructExtractor.cpp; sourceTree = "<group>"; };
 		49307AAD11DEA4D90081F992 /* IRForTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IRForTarget.cpp; path = source/Expression/IRForTarget.cpp; sourceTree = "<group>"; };
 		49307AB111DEA4F20081F992 /* IRForTarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IRForTarget.h; path = include/lldb/Expression/IRForTarget.h; sourceTree = "<group>"; };
@@ -2246,7 +2246,7 @@
 		494260D914579144003C1C78 /* VerifyDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VerifyDecl.cpp; path = source/Symbol/VerifyDecl.cpp; sourceTree = "<group>"; };
 		49445C2512245E3600C11A81 /* ClangExpressionParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangExpressionParser.cpp; path = source/Expression/ClangExpressionParser.cpp; sourceTree = "<group>"; };
 		49445C2912245E5500C11A81 /* ClangExpressionParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangExpressionParser.h; path = include/lldb/Expression/ClangExpressionParser.h; sourceTree = "<group>"; };
-		49445E341225AB6A00C11A81 /* ClangUserExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangUserExpression.h; path = include/lldb/Expression/ClangUserExpression.h; sourceTree = "<group>"; };
+		49445E341225AB6A00C11A81 /* ClangUserExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = ClangUserExpression.h; path = include/lldb/Expression/ClangUserExpression.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
 		4959511B1A1BC48100F6F8FC /* ClangModulesDeclVendor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangModulesDeclVendor.h; path = include/lldb/Expression/ClangModulesDeclVendor.h; sourceTree = "<group>"; };
 		4959511E1A1BC4BC00F6F8FC /* ClangModulesDeclVendor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangModulesDeclVendor.cpp; path = source/Expression/ClangModulesDeclVendor.cpp; sourceTree = "<group>"; };
 		495B38431489714C002708C5 /* ClangExternalASTSourceCommon.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ClangExternalASTSourceCommon.h; path = include/lldb/Symbol/ClangExternalASTSourceCommon.h; sourceTree = "<group>"; };
@@ -2266,7 +2266,7 @@
 		4984BA151B979973008658D4 /* ExpressionVariable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExpressionVariable.cpp; path = source/Expression/ExpressionVariable.cpp; sourceTree = "<group>"; };
 		4984BA171B979C08008658D4 /* ExpressionVariable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExpressionVariable.h; path = include/lldb/Expression/ExpressionVariable.h; sourceTree = "<group>"; };
 		499F381E11A5B3F300F5CE02 /* CommandObjectArgs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectArgs.h; path = source/Commands/CommandObjectArgs.h; sourceTree = "<group>"; };
-		499F381F11A5B3F300F5CE02 /* CommandObjectArgs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectArgs.cpp; path = source/Commands/CommandObjectArgs.cpp; sourceTree = "<group>"; };
+		499F381F11A5B3F300F5CE02 /* CommandObjectArgs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; name = CommandObjectArgs.cpp; path = source/Commands/CommandObjectArgs.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
 		49A1CAC11430E21D00306AC9 /* ExpressionSourceCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExpressionSourceCode.h; path = include/lldb/Expression/ExpressionSourceCode.h; sourceTree = "<group>"; };
 		49A1CAC31430E8BD00306AC9 /* ExpressionSourceCode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExpressionSourceCode.cpp; path = source/Expression/ExpressionSourceCode.cpp; sourceTree = "<group>"; };
 		49A8A39F11D568A300AD3B68 /* ASTResultSynthesizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ASTResultSynthesizer.cpp; path = source/Expression/ASTResultSynthesizer.cpp; sourceTree = "<group>"; };
@@ -2276,7 +2276,7 @@
 		49C66B1C17011A43004D1922 /* IRMemoryMap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = IRMemoryMap.h; path = include/lldb/Expression/IRMemoryMap.h; sourceTree = "<group>"; };
 		49CF9829122C70BD007A0B96 /* IRDynamicChecks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IRDynamicChecks.cpp; path = source/Expression/IRDynamicChecks.cpp; sourceTree = "<group>"; };
 		49CF9833122C718B007A0B96 /* IRDynamicChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IRDynamicChecks.h; path = include/lldb/Expression/IRDynamicChecks.h; sourceTree = "<group>"; };
-		49D4FE821210B5FB00CDB854 /* ClangPersistentVariables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangPersistentVariables.h; path = include/lldb/Expression/ClangPersistentVariables.h; sourceTree = "<group>"; };
+		49D4FE821210B5FB00CDB854 /* ClangPersistentVariables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = ClangPersistentVariables.h; path = include/lldb/Expression/ClangPersistentVariables.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
 		49D4FE871210B61C00CDB854 /* ClangPersistentVariables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangPersistentVariables.cpp; path = source/Expression/ClangPersistentVariables.cpp; sourceTree = "<group>"; };
 		49D7072611B5AD03001AD875 /* ClangASTSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangASTSource.h; path = include/lldb/Expression/ClangASTSource.h; sourceTree = "<group>"; };
 		49D7072811B5AD11001AD875 /* ClangASTSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangASTSource.cpp; path = source/Expression/ClangASTSource.cpp; sourceTree = "<group>"; };
@@ -2286,13 +2286,13 @@
 		49DA65041485C942005FF180 /* AppleObjCDeclVendor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppleObjCDeclVendor.h; sourceTree = "<group>"; };
 		49DCF6FD170E6B4A0092F75E /* IRMemoryMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IRMemoryMap.cpp; path = source/Expression/IRMemoryMap.cpp; sourceTree = "<group>"; };
 		49DCF6FF170E6FD90092F75E /* Materializer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Materializer.h; path = include/lldb/Expression/Materializer.h; sourceTree = "<group>"; };
-		49DCF700170E70120092F75E /* Materializer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Materializer.cpp; path = source/Expression/Materializer.cpp; sourceTree = "<group>"; };
+		49DCF700170E70120092F75E /* Materializer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; name = Materializer.cpp; path = source/Expression/Materializer.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
 		49E45FA911F660DC008F7B28 /* CompilerType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CompilerType.h; path = include/lldb/Symbol/CompilerType.h; sourceTree = "<group>"; };
 		49E45FAD11F660FE008F7B28 /* CompilerType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompilerType.cpp; path = source/Symbol/CompilerType.cpp; sourceTree = "<group>"; };
 		49EC3E98118F90AC00B1265E /* ThreadPlanCallFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanCallFunction.cpp; path = source/Target/ThreadPlanCallFunction.cpp; sourceTree = "<group>"; };
 		49EC3E9C118F90D400B1265E /* ThreadPlanCallFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanCallFunction.h; path = include/lldb/Target/ThreadPlanCallFunction.h; sourceTree = "<group>"; };
 		49F1A74511B3388F003ED505 /* ClangExpressionDeclMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangExpressionDeclMap.cpp; path = source/Expression/ClangExpressionDeclMap.cpp; sourceTree = "<group>"; };
-		49F1A74911B338AE003ED505 /* ClangExpressionDeclMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangExpressionDeclMap.h; path = include/lldb/Expression/ClangExpressionDeclMap.h; sourceTree = "<group>"; };
+		49F1A74911B338AE003ED505 /* ClangExpressionDeclMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = ClangExpressionDeclMap.h; path = include/lldb/Expression/ClangExpressionDeclMap.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
 		4C00986F11500B4300F316B0 /* UnixSignals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UnixSignals.h; path = include/lldb/Target/UnixSignals.h; sourceTree = "<group>"; };
 		4C00987011500B4300F316B0 /* UnixSignals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UnixSignals.cpp; path = source/Target/UnixSignals.cpp; sourceTree = "<group>"; };
 		4C08CDE711C81EF8001610A8 /* ThreadSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadSpec.cpp; path = source/Target/ThreadSpec.cpp; sourceTree = "<group>"; };

Modified: lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme (original)
+++ lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme Fri Sep  4 15:49:51 2015
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
    LastUpgradeVersion = "0610"
-   version = "1.8">
+   version = "1.3">
    <BuildAction
       parallelizeBuildables = "NO"
       buildImplicitDependencies = "YES">
@@ -23,10 +23,10 @@
       </BuildActionEntries>
    </BuildAction>
    <TestAction
+      buildConfiguration = "Debug"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      buildConfiguration = "Debug">
+      shouldUseLaunchSchemeArgsEnv = "YES">
       <Testables>
       </Testables>
       <MacroExpansion>
@@ -80,14 +80,16 @@
             isEnabled = "YES">
          </EnvironmentVariable>
       </EnvironmentVariables>
+      <AdditionalOptions>
+      </AdditionalOptions>
    </TestAction>
    <LaunchAction
+      buildConfiguration = "DebugClang"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      launchStyle = "0"
+      launchStyle = "1"
       useCustomWorkingDirectory = "NO"
       customWorkingDirectory = "/Volumes/work/gclayton/Documents/devb/attach"
-      buildConfiguration = "DebugClang"
       ignoresPersistentStateOnLaunch = "YES"
       debugDocumentVersioning = "YES"
       debugServiceExtension = "internal"
@@ -143,10 +145,10 @@
       </AdditionalOptions>
    </LaunchAction>
    <ProfileAction
+      buildConfiguration = "Release"
       shouldUseLaunchSchemeArgsEnv = "YES"
       savedToolIdentifier = ""
       useCustomWorkingDirectory = "NO"
-      buildConfiguration = "Release"
       ignoresPersistentStateOnLaunch = "YES"
       debugDocumentVersioning = "YES">
       <BuildableProductRunnable

Modified: lldb/trunk/source/API/SBFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFrame.cpp?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/source/API/SBFrame.cpp (original)
+++ lldb/trunk/source/API/SBFrame.cpp Fri Sep  4 15:49:51 2015
@@ -956,7 +956,7 @@ SBFrame::FindValue (const char *name, Va
                 case eValueTypeConstResult:         // constant result variables
                     {
                         ConstString const_name(name);
-                        ClangExpressionVariableSP expr_var_sp (target->GetPersistentVariables().GetVariable (const_name));
+                        ExpressionVariableSP expr_var_sp (target->GetPersistentVariables().GetVariable (const_name));
                         if (expr_var_sp)
                         {
                             value_sp = expr_var_sp->GetValueObject();

Modified: lldb/trunk/source/Breakpoint/BreakpointLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointLocation.cpp?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointLocation.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointLocation.cpp Fri Sep  4 15:49:51 2015
@@ -314,7 +314,7 @@ BreakpointLocation::ConditionSaysStop (E
     
     StreamString execution_errors;
     
-    ClangExpressionVariableSP result_variable_sp;
+    ExpressionVariableSP result_variable_sp;
     
     ExpressionResults result_code =
     m_user_expression_sp->Execute(execution_errors,

Modified: lldb/trunk/source/Core/FormatEntity.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/FormatEntity.cpp?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/source/Core/FormatEntity.cpp (original)
+++ lldb/trunk/source/Core/FormatEntity.cpp Fri Sep  4 15:49:51 2015
@@ -1437,7 +1437,7 @@ FormatEntity::Format (const Entry &entry
                     StopInfoSP stop_info_sp = thread->GetStopInfo ();
                     if (stop_info_sp && stop_info_sp->IsValid())
                     {
-                        ClangExpressionVariableSP expression_var_sp = StopInfo::GetExpressionVariable (stop_info_sp);
+                        ExpressionVariableSP expression_var_sp = StopInfo::GetExpressionVariable (stop_info_sp);
                         if (expression_var_sp && expression_var_sp->GetValueObject())
                         {
                             expression_var_sp->GetValueObject()->Dump(s);

Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Fri Sep  4 15:49:51 2015
@@ -4280,7 +4280,7 @@ ValueObject::Persist ()
     
     ConstString name(target_sp->GetPersistentVariables().GetNextPersistentVariableName());
     
-    ClangExpressionVariableSP clang_var_sp(new ClangExpressionVariable(target_sp.get(), GetValue(), name));
+    ExpressionVariableSP clang_var_sp(new ClangExpressionVariable(target_sp.get(), GetValue(), name));
     if (clang_var_sp)
     {
         clang_var_sp->m_live_sp = clang_var_sp->m_frozen_sp;

Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Fri Sep  4 15:49:51 2015
@@ -134,18 +134,18 @@ ClangExpressionDeclMap::DidParse()
              entity_index < num_entities;
              ++entity_index)
         {
-            ClangExpressionVariableSP var_sp(m_found_entities.GetVariableAtIndex(entity_index));
+            ExpressionVariableSP var_sp(m_found_entities.GetVariableAtIndex(entity_index));
             if (var_sp)
-                var_sp->DisableParserVars(GetParserID());
+                var_sp->AsClangExpressionVariable()->DisableParserVars(GetParserID());
         }
 
         for (size_t pvar_index = 0, num_pvars = m_parser_vars->m_persistent_vars->GetSize();
              pvar_index < num_pvars;
              ++pvar_index)
         {
-            ClangExpressionVariableSP pvar_sp(m_parser_vars->m_persistent_vars->GetVariableAtIndex(pvar_index));
+            ExpressionVariableSP pvar_sp(m_parser_vars->m_persistent_vars->GetVariableAtIndex(pvar_index));
             if (pvar_sp)
-                pvar_sp->DisableParserVars(GetParserID());
+                pvar_sp->AsClangExpressionVariable()->DisableParserVars(GetParserID());
         }
 
         DisableParserVars();
@@ -212,25 +212,26 @@ ClangExpressionDeclMap::AddPersistentVar
 
         uint32_t offset = m_parser_vars->m_materializer->AddResultVariable(user_type, is_lvalue, m_keep_result_in_memory, err);
 
-        ClangExpressionVariableSP var_sp = m_found_entities.CreateVariable(exe_ctx.GetBestExecutionContextScope(),
-                                                                           name,
-                                                                           user_type,
-                                                                           m_parser_vars->m_target_info.byte_order,
-                                                                           m_parser_vars->m_target_info.address_byte_size);
+        ClangExpressionVariable *var = ClangExpressionVariable::CreateVariableInList(m_found_entities,
+                                                                                     exe_ctx.GetBestExecutionContextScope(),
+                                                                                     name,
+                                                                                     user_type,
+                                                                                     m_parser_vars->m_target_info.byte_order,
+                                                                                     m_parser_vars->m_target_info.address_byte_size);
 
-        if (!var_sp)
+        if (!var)
             return false;
 
-        var_sp->EnableParserVars(GetParserID());
+        var->EnableParserVars(GetParserID());
 
-        ClangExpressionVariable::ParserVars *parser_vars = var_sp->GetParserVars(GetParserID());
+        ClangExpressionVariable::ParserVars *parser_vars = var->GetParserVars(GetParserID());
 
         parser_vars->m_named_decl = decl;
         parser_vars->m_parser_type = parser_type;
 
-        var_sp->EnableJITVars(GetParserID());
+        var->EnableJITVars(GetParserID());
 
-        ClangExpressionVariable::JITVars *jit_vars = var_sp->GetJITVars(GetParserID());
+        ClangExpressionVariable::JITVars *jit_vars = var->GetJITVars(GetParserID());
 
         jit_vars->m_offset = offset;
 
@@ -260,43 +261,43 @@ ClangExpressionDeclMap::AddPersistentVar
     if (!m_parser_vars->m_target_info.IsValid())
         return false;
 
-    ClangExpressionVariableSP var_sp = m_parser_vars->m_persistent_vars->CreatePersistentVariable (exe_ctx.GetBestExecutionContextScope (),
-                                                                                                   name,
-                                                                                                   user_type,
-                                                                                                   m_parser_vars->m_target_info.byte_order,
-                                                                                                   m_parser_vars->m_target_info.address_byte_size);
+    ClangExpressionVariable *var = m_parser_vars->m_persistent_vars->CreatePersistentVariable (exe_ctx.GetBestExecutionContextScope (),
+                                                                                               name,
+                                                                                               user_type,
+                                                                                               m_parser_vars->m_target_info.byte_order,
+                                                                                               m_parser_vars->m_target_info.address_byte_size);
 
-    if (!var_sp)
+    if (!var)
         return false;
 
-    var_sp->m_frozen_sp->SetHasCompleteType();
+    var->m_frozen_sp->SetHasCompleteType();
 
     if (is_result)
-        var_sp->m_flags |= ClangExpressionVariable::EVNeedsFreezeDry;
+        var->m_flags |= ClangExpressionVariable::EVNeedsFreezeDry;
     else
-        var_sp->m_flags |= ClangExpressionVariable::EVKeepInTarget; // explicitly-declared persistent variables should persist
+        var->m_flags |= ClangExpressionVariable::EVKeepInTarget; // explicitly-declared persistent variables should persist
 
     if (is_lvalue)
     {
-        var_sp->m_flags |= ClangExpressionVariable::EVIsProgramReference;
+        var->m_flags |= ClangExpressionVariable::EVIsProgramReference;
     }
     else
     {
-        var_sp->m_flags |= ClangExpressionVariable::EVIsLLDBAllocated;
-        var_sp->m_flags |= ClangExpressionVariable::EVNeedsAllocation;
+        var->m_flags |= ClangExpressionVariable::EVIsLLDBAllocated;
+        var->m_flags |= ClangExpressionVariable::EVNeedsAllocation;
     }
 
     if (m_keep_result_in_memory)
     {
-        var_sp->m_flags |= ClangExpressionVariable::EVKeepInTarget;
+        var->m_flags |= ClangExpressionVariable::EVKeepInTarget;
     }
 
     if (log)
-        log->Printf("Created persistent variable with flags 0x%hx", var_sp->m_flags);
+        log->Printf("Created persistent variable with flags 0x%hx", var->m_flags);
 
-    var_sp->EnableParserVars(GetParserID());
+    var->EnableParserVars(GetParserID());
 
-    ClangExpressionVariable::ParserVars *parser_vars = var_sp->GetParserVars(GetParserID());
+    ClangExpressionVariable::ParserVars *parser_vars = var->GetParserVars(GetParserID());
 
     parser_vars->m_named_decl = decl;
     parser_vars->m_parser_type = parser_type;
@@ -323,33 +324,33 @@ ClangExpressionDeclMap::AddValueToStruct
 
     m_struct_vars->m_struct_laid_out = false;
 
-    if (m_struct_members.GetVariable(decl, GetParserID()))
+    if (ClangExpressionVariable::FindVariableInList(m_struct_members, decl, GetParserID()))
         return true;
 
-    ClangExpressionVariableSP var_sp (m_found_entities.GetVariable(decl, GetParserID()));
+    ClangExpressionVariable *var(ClangExpressionVariable::FindVariableInList(m_found_entities, decl, GetParserID()));
 
-    if (!var_sp)
+    if (!var)
     {
-        var_sp = m_parser_vars->m_persistent_vars->GetVariable(decl, GetParserID());
+        var = ClangExpressionVariable::FindVariableInList(*m_parser_vars->m_persistent_vars, decl, GetParserID());
         is_persistent_variable = true;
     }
 
-    if (!var_sp)
+    if (!var)
         return false;
 
     if (log)
         log->Printf("Adding value for (NamedDecl*)%p [%s - %s] to the structure",
                     static_cast<const void*>(decl), name.GetCString(),
-                    var_sp->GetName().GetCString());
+                    var->GetName().GetCString());
 
     // We know entity->m_parser_vars is valid because we used a parser variable
     // to find it
 
-    ClangExpressionVariable::ParserVars *parser_vars = var_sp->GetParserVars(GetParserID());
+    ClangExpressionVariable::ParserVars *parser_vars = var->AsClangExpressionVariable()->GetParserVars(GetParserID());
 
     parser_vars->m_llvm_value = value;
 
-    if (ClangExpressionVariable::JITVars *jit_vars = var_sp->GetJITVars(GetParserID()))
+    if (ClangExpressionVariable::JITVars *jit_vars = var->AsClangExpressionVariable()->GetJITVars(GetParserID()))
     {
         // We already laid this out; do not touch
 
@@ -357,14 +358,14 @@ ClangExpressionDeclMap::AddValueToStruct
             log->Printf("Already placed at 0x%llx", (unsigned long long)jit_vars->m_offset);
     }
 
-    var_sp->EnableJITVars(GetParserID());
+    var->AsClangExpressionVariable()->EnableJITVars(GetParserID());
 
-    ClangExpressionVariable::JITVars *jit_vars = var_sp->GetJITVars(GetParserID());
+    ClangExpressionVariable::JITVars *jit_vars = var->AsClangExpressionVariable()->GetJITVars(GetParserID());
 
     jit_vars->m_alignment = alignment;
     jit_vars->m_size = size;
 
-    m_struct_members.AddVariable(var_sp);
+    m_struct_members.AddVariable(var->shared_from_this());
 
     if (m_parser_vars->m_materializer)
     {
@@ -374,13 +375,14 @@ ClangExpressionDeclMap::AddValueToStruct
 
         if (is_persistent_variable)
         {
+            ExpressionVariableSP var_sp(var->shared_from_this());
             offset = m_parser_vars->m_materializer->AddPersistentVariable(var_sp, err);
         }
         else
         {
             if (const lldb_private::Symbol *sym = parser_vars->m_lldb_sym)
                 offset = m_parser_vars->m_materializer->AddSymbol(*sym, err);
-            else if (const RegisterInfo *reg_info = var_sp->GetRegisterInfo())
+            else if (const RegisterInfo *reg_info = var->GetRegisterInfo())
                 offset = m_parser_vars->m_materializer->AddRegister(*reg_info, err);
             else if (parser_vars->m_lldb_var)
                 offset = m_parser_vars->m_materializer->AddVariable(parser_vars->m_lldb_var, err);
@@ -452,13 +454,13 @@ ClangExpressionDeclMap::GetStructElement
     if (index >= m_struct_members.GetSize())
         return false;
 
-    ClangExpressionVariableSP member_sp(m_struct_members.GetVariableAtIndex(index));
+    ExpressionVariableSP member_sp(m_struct_members.GetVariableAtIndex(index));
 
     if (!member_sp)
         return false;
 
-    ClangExpressionVariable::ParserVars *parser_vars = member_sp->GetParserVars(GetParserID());
-    ClangExpressionVariable::JITVars *jit_vars = member_sp->GetJITVars(GetParserID());
+    ClangExpressionVariable::ParserVars *parser_vars = member_sp->AsClangExpressionVariable()->GetParserVars(GetParserID());
+    ClangExpressionVariable::JITVars *jit_vars = member_sp->AsClangExpressionVariable()->GetJITVars(GetParserID());
 
     if (!parser_vars ||
         !jit_vars ||
@@ -480,15 +482,15 @@ ClangExpressionDeclMap::GetFunctionInfo
     uint64_t &ptr
 )
 {
-    ClangExpressionVariableSP entity_sp(m_found_entities.GetVariable(decl, GetParserID()));
+    ClangExpressionVariable *entity(ClangExpressionVariable::FindVariableInList(m_found_entities, decl, GetParserID()));
 
-    if (!entity_sp)
+    if (!entity)
         return false;
 
     // We know m_parser_vars is valid since we searched for the variable by
     // its NamedDecl
 
-    ClangExpressionVariable::ParserVars *parser_vars = entity_sp->GetParserVars(GetParserID());
+    ClangExpressionVariable::ParserVars *parser_vars = entity->GetParserVars(GetParserID());
 
     ptr = parser_vars->m_lldb_value.GetScalar().ULongLong();
 
@@ -1315,7 +1317,7 @@ ClangExpressionDeclMap::FindExternalVisi
             context.AddNamedDecl(parser_ptype_type_decl);
         } while (0);
 
-        ClangExpressionVariableSP pvar_sp(m_parser_vars->m_persistent_vars->GetVariable(name));
+        ExpressionVariableSP pvar_sp(m_parser_vars->m_persistent_vars->GetVariable(name));
 
         if (pvar_sp)
         {
@@ -1771,9 +1773,9 @@ ClangExpressionDeclMap::AddOneVariable (
 
     std::string decl_name(context.m_decl_name.getAsString());
     ConstString entity_name(decl_name.c_str());
-    ClangExpressionVariableSP entity(m_found_entities.CreateVariable (valobj));
+    ClangExpressionVariable *entity(ClangExpressionVariable::CreateVariableInList(m_found_entities, valobj));
 
-    assert (entity.get());
+    assert (entity);
     entity->EnableParserVars(GetParserID());
     ClangExpressionVariable::ParserVars *parser_vars = entity->GetParserVars(GetParserID());
     parser_vars->m_parser_type = pt;
@@ -1795,12 +1797,12 @@ ClangExpressionDeclMap::AddOneVariable (
 
 void
 ClangExpressionDeclMap::AddOneVariable(NameSearchContext &context,
-                                       ClangExpressionVariableSP &pvar_sp,
+                                       ExpressionVariableSP &pvar_sp,
                                        unsigned int current_id)
 {
     Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
 
-    TypeFromUser user_type (pvar_sp->GetTypeFromUser());
+    TypeFromUser user_type (pvar_sp->AsClangExpressionVariable()->GetTypeFromUser());
 
     TypeFromParser parser_type (GuardedCopyType(user_type));
 
@@ -1813,8 +1815,8 @@ ClangExpressionDeclMap::AddOneVariable(N
 
     NamedDecl *var_decl = context.AddVarDecl(ClangASTContext::GetLValueReferenceType(parser_type));
 
-    pvar_sp->EnableParserVars(GetParserID());
-    ClangExpressionVariable::ParserVars *parser_vars = pvar_sp->GetParserVars(GetParserID());
+    pvar_sp->AsClangExpressionVariable()->EnableParserVars(GetParserID());
+    ClangExpressionVariable::ParserVars *parser_vars = pvar_sp->AsClangExpressionVariable()->GetParserVars(GetParserID());
     parser_vars->m_parser_type = parser_type;
     parser_vars->m_named_decl = var_decl;
     parser_vars->m_llvm_value = NULL;
@@ -1849,12 +1851,13 @@ ClangExpressionDeclMap::AddOneGenericVar
 
     std::string decl_name(context.m_decl_name.getAsString());
     ConstString entity_name(decl_name.c_str());
-    ClangExpressionVariableSP entity(m_found_entities.CreateVariable (m_parser_vars->m_exe_ctx.GetBestExecutionContextScope (),
-                                                                      entity_name,
-                                                                      user_type,
-                                                                      m_parser_vars->m_target_info.byte_order,
-                                                                      m_parser_vars->m_target_info.address_byte_size));
-    assert (entity.get());
+    ClangExpressionVariable *entity(ClangExpressionVariable::CreateVariableInList(m_found_entities,
+                                                                                  m_parser_vars->m_exe_ctx.GetBestExecutionContextScope (),
+                                                                                  entity_name,
+                                                                                  user_type,
+                                                                                  m_parser_vars->m_target_info.byte_order,
+                                                                                  m_parser_vars->m_target_info.address_byte_size));
+    assert (entity);
 
     entity->EnableParserVars(GetParserID());
     ClangExpressionVariable::ParserVars *parser_vars = entity->GetParserVars(GetParserID());
@@ -1892,9 +1895,9 @@ ClangExpressionDeclMap::ResolveUnknownTy
          index < num_entities;
          ++index)
     {
-        ClangExpressionVariableSP entity = m_found_entities.GetVariableAtIndex(index);
+        ExpressionVariableSP entity = m_found_entities.GetVariableAtIndex(index);
 
-        ClangExpressionVariable::ParserVars *parser_vars = entity->GetParserVars(GetParserID());
+        ClangExpressionVariable::ParserVars *parser_vars = entity->AsClangExpressionVariable()->GetParserVars(GetParserID());
 
         if (entity->m_flags & ClangExpressionVariable::EVUnknownType)
         {
@@ -1924,7 +1927,7 @@ ClangExpressionDeclMap::ResolveUnknownTy
                 if (log)
                     log->Printf("ClangExpressionDeclMap::ResolveUnknownType - Couldn't import the type for a variable");
 
-                return (bool) lldb::ClangExpressionVariableSP();
+                return (bool) lldb::ExpressionVariableSP();
             }
 
             TypeFromUser user_type(copied_type, scratch_ast_context);
@@ -1964,10 +1967,11 @@ ClangExpressionDeclMap::AddOneRegister (
 
     NamedDecl *var_decl = context.AddVarDecl(parser_clang_type);
 
-    ClangExpressionVariableSP entity(m_found_entities.CreateVariable (m_parser_vars->m_exe_ctx.GetBestExecutionContextScope(),
-                                                                      m_parser_vars->m_target_info.byte_order,
-                                                                      m_parser_vars->m_target_info.address_byte_size));
-    assert (entity.get());
+    ClangExpressionVariable *entity(ClangExpressionVariable::CreateVariableInList(m_found_entities,
+                                                                                  m_parser_vars->m_exe_ctx.GetBestExecutionContextScope(),
+                                                                                  m_parser_vars->m_target_info.byte_order,
+                                                                                  m_parser_vars->m_target_info.address_byte_size));
+    assert (entity);
 
     std::string decl_name(context.m_decl_name.getAsString());
     entity->SetName (ConstString (decl_name.c_str()));
@@ -2072,10 +2076,11 @@ ClangExpressionDeclMap::AddOneFunction (
 
     lldb::addr_t load_addr = fun_address.GetCallableLoadAddress(target, is_indirect_function);
 
-    ClangExpressionVariableSP entity(m_found_entities.CreateVariable (m_parser_vars->m_exe_ctx.GetBestExecutionContextScope (),
-                                                                      m_parser_vars->m_target_info.byte_order,
-                                                                      m_parser_vars->m_target_info.address_byte_size));
-    assert (entity.get());
+    ClangExpressionVariable *entity(ClangExpressionVariable::CreateVariableInList (m_found_entities,
+                                                                                   m_parser_vars->m_exe_ctx.GetBestExecutionContextScope (),
+                                                                                   m_parser_vars->m_target_info.byte_order,
+                                                                                   m_parser_vars->m_target_info.address_byte_size));
+    assert (entity);
 
     std::string decl_name(context.m_decl_name.getAsString());
     entity->SetName(ConstString(decl_name.c_str()));

Modified: lldb/trunk/source/Expression/ClangPersistentVariables.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangPersistentVariables.cpp?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangPersistentVariables.cpp (original)
+++ lldb/trunk/source/Expression/ClangPersistentVariables.cpp Fri Sep  4 15:49:51 2015
@@ -19,35 +19,29 @@ using namespace lldb;
 using namespace lldb_private;
 
 ClangPersistentVariables::ClangPersistentVariables () :
-    ClangExpressionVariableList(),
+    ExpressionVariableList(),
     m_next_persistent_variable_id (0)
 {
 }
 
-ClangExpressionVariableSP
+ExpressionVariableSP
 ClangPersistentVariables::CreatePersistentVariable (const lldb::ValueObjectSP &valobj_sp)
 {
-    ClangExpressionVariableSP var_sp (CreateVariable(valobj_sp));
-    return var_sp;
+    return ClangExpressionVariable::CreateVariableInList(*this, valobj_sp)->shared_from_this();
 }
 
-ClangExpressionVariableSP
+ClangExpressionVariable *
 ClangPersistentVariables::CreatePersistentVariable (ExecutionContextScope *exe_scope, 
                                                     const ConstString &name, 
                                                     const TypeFromUser& user_type, 
                                                     lldb::ByteOrder byte_order, 
                                                     uint32_t addr_byte_size)
 {
-    ClangExpressionVariableSP var_sp (GetVariable(name));
-    
-    if (!var_sp)
-        var_sp = CreateVariable(exe_scope, name, user_type, byte_order, addr_byte_size);
-
-    return var_sp;
+    return ClangExpressionVariable::CreateVariableInList(*this, exe_scope, name, user_type, byte_order, addr_byte_size);
 }
 
 void
-ClangPersistentVariables::RemovePersistentVariable (lldb::ClangExpressionVariableSP variable)
+ClangPersistentVariables::RemovePersistentVariable (lldb::ExpressionVariableSP variable)
 {
     RemoveVariable(variable);
     

Modified: lldb/trunk/source/Expression/ClangUserExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangUserExpression.cpp?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangUserExpression.cpp (original)
+++ lldb/trunk/source/Expression/ClangUserExpression.cpp Fri Sep  4 15:49:51 2015
@@ -797,7 +797,7 @@ ClangUserExpression::PrepareToExecuteJIT
 bool
 ClangUserExpression::FinalizeJITExecution (Stream &error_stream,
                                            ExecutionContext &exe_ctx,
-                                           lldb::ClangExpressionVariableSP &result,
+                                           lldb::ExpressionVariableSP &result,
                                            lldb::addr_t function_stack_bottom,
                                            lldb::addr_t function_stack_top)
 {
@@ -835,7 +835,7 @@ ClangUserExpression::Execute (Stream &er
                               ExecutionContext &exe_ctx,
                               const EvaluateExpressionOptions& options,
                               lldb::ClangUserExpressionSP &shared_ptr_to_me,
-                              lldb::ClangExpressionVariableSP &result)
+                              lldb::ExpressionVariableSP &result)
 {
     // The expression log is quite verbose, and if you're just tracking the execution of the
     // expression, it's quite convenient to have these logs come out with the STEP log as well.
@@ -1090,7 +1090,7 @@ ClangUserExpression::Evaluate (Execution
     }
     else
     {
-        lldb::ClangExpressionVariableSP expr_result;
+        lldb::ExpressionVariableSP expr_result;
 
         if (execution_policy == eExecutionPolicyNever &&
             !user_expression_sp->CanInterpret())

Modified: lldb/trunk/source/Expression/ExpressionVariable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ExpressionVariable.cpp?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ExpressionVariable.cpp (original)
+++ lldb/trunk/source/Expression/ExpressionVariable.cpp Fri Sep  4 15:49:51 2015
@@ -9,3 +9,24 @@
 
 #include "lldb/Expression/ExpressionVariable.h"
 
+using namespace lldb_private;
+
+ExpressionVariable::~ExpressionVariable()
+{
+}
+
+uint8_t *
+ExpressionVariable::GetValueBytes()
+{
+    const size_t byte_size = m_frozen_sp->GetByteSize();
+    if (byte_size > 0)
+    {
+        if (m_frozen_sp->GetDataExtractor().GetByteSize() < byte_size)
+        {
+            m_frozen_sp->GetValue().ResizeData(byte_size);
+            m_frozen_sp->GetValue().GetData (m_frozen_sp->GetDataExtractor());
+        }
+        return const_cast<uint8_t *>(m_frozen_sp->GetDataExtractor().GetDataStart());
+    }
+    return NULL;
+}

Modified: lldb/trunk/source/Expression/Materializer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/Materializer.cpp?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/source/Expression/Materializer.cpp (original)
+++ lldb/trunk/source/Expression/Materializer.cpp Fri Sep  4 15:49:51 2015
@@ -66,7 +66,7 @@ Materializer::Entity::SetSizeAndAlignmen
 class EntityPersistentVariable : public Materializer::Entity
 {
 public:
-    EntityPersistentVariable (lldb::ClangExpressionVariableSP &persistent_variable_sp) :
+    EntityPersistentVariable (lldb::ExpressionVariableSP &persistent_variable_sp) :
         Entity(),
         m_persistent_variable_sp(persistent_variable_sp)
     {
@@ -99,9 +99,9 @@ public:
             log->Printf("Allocated %s (0x%" PRIx64 ") successfully", m_persistent_variable_sp->GetName().GetCString(), mem);
         
         // Put the location of the spare memory into the live data of the ValueObject.
-                
+        
         m_persistent_variable_sp->m_live_sp = ValueObjectConstResult::Create (map.GetBestExecutionContextScope(),
-                                                                              m_persistent_variable_sp->GetTypeFromUser(),
+                                                                              m_persistent_variable_sp->AsClangExpressionVariable()->GetTypeFromUser(),
                                                                               m_persistent_variable_sp->GetName(),
                                                                               mem,
                                                                               eAddressTypeLoad,
@@ -230,9 +230,9 @@ public:
                     err.SetErrorStringWithFormat("couldn't read the address of program-allocated variable %s: %s", m_persistent_variable_sp->GetName().GetCString(), read_error.AsCString());
                     return;
                 }
-                                
+                
                 m_persistent_variable_sp->m_live_sp = ValueObjectConstResult::Create (map.GetBestExecutionContextScope (),
-                                                                                      m_persistent_variable_sp->GetTypeFromUser(),
+                                                                                      m_persistent_variable_sp->AsClangExpressionVariable()->GetTypeFromUser(),
                                                                                       m_persistent_variable_sp->GetName(),
                                                                                       location,
                                                                                       eAddressTypeLoad,
@@ -390,11 +390,11 @@ public:
     {
     }
 private:
-    lldb::ClangExpressionVariableSP m_persistent_variable_sp;
+    lldb::ExpressionVariableSP m_persistent_variable_sp;
 };
 
 uint32_t
-Materializer::AddPersistentVariable (lldb::ClangExpressionVariableSP &persistent_variable_sp, Error &err)
+Materializer::AddPersistentVariable (lldb::ExpressionVariableSP &persistent_variable_sp, Error &err)
 {
     EntityVector::iterator iter = m_entities.insert(m_entities.end(), EntityUP());
     iter->reset (new EntityPersistentVariable (persistent_variable_sp));
@@ -820,7 +820,7 @@ public:
         err.SetErrorString("Tried to detmaterialize a result variable with the normal Dematerialize method");
     }
     
-    void Dematerialize (lldb::ClangExpressionVariableSP &result_variable_sp,
+    void Dematerialize (lldb::ExpressionVariableSP &result_variable_sp,
                         lldb::StackFrameSP &frame_sp,
                         IRMemoryMap &map,
                         lldb::addr_t process_address,
@@ -860,13 +860,12 @@ public:
         
         ConstString name = target_sp->GetPersistentVariables().GetNextPersistentVariableName();
         
-        lldb::ClangExpressionVariableSP ret;
-        
-        ret = target_sp->GetPersistentVariables().CreateVariable(exe_scope,
-                                                                 name,
-                                                                 m_type,
-                                                                 map.GetByteOrder(),
-                                                                 map.GetAddressByteSize());
+        lldb::ExpressionVariableSP ret = ClangExpressionVariable::CreateVariableInList(target_sp->GetPersistentVariables(),
+                                                                                       exe_scope,
+                                                                                       name,
+                                                                                       m_type,
+                                                                                       map.GetByteOrder(),
+                                                                                       map.GetAddressByteSize())->shared_from_this();
         
         if (!ret)
         {
@@ -1395,7 +1394,7 @@ Materializer::Materialize (lldb::StackFr
 }
 
 void
-Materializer::Dematerializer::Dematerialize (Error &error, lldb::ClangExpressionVariableSP &result_sp, lldb::addr_t frame_bottom, lldb::addr_t frame_top)
+Materializer::Dematerializer::Dematerialize (Error &error, lldb::ExpressionVariableSP &result_sp, lldb::addr_t frame_bottom, lldb::addr_t frame_top)
 {
     lldb::StackFrameSP frame_sp;
 

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp Fri Sep  4 15:49:51 2015
@@ -24,122 +24,38 @@ using namespace clang;
 const char *g_clang_expression_variable_kind_name = "ClangExpressionVariable";
 
 ClangExpressionVariable::ClangExpressionVariable(ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order, uint32_t addr_byte_size) :
+    ExpressionVariable(),
     m_parser_vars(),
-    m_jit_vars (),
-    m_flags (EVNone),
-    m_frozen_sp (ValueObjectConstResult::Create (exe_scope, byte_order, addr_byte_size))
+    m_jit_vars ()
 {
+    m_flags = EVNone;
+    m_frozen_sp = ValueObjectConstResult::Create (exe_scope, byte_order, addr_byte_size);
 }
 
 ClangExpressionVariable::ClangExpressionVariable (ExecutionContextScope *exe_scope,
                                                   Value &value,
                                                   const ConstString &name,
                                                   uint16_t flags) :
+    ExpressionVariable(),
     m_parser_vars(),
-    m_jit_vars (),
-    m_flags (flags),
-    m_frozen_sp (ValueObjectConstResult::Create (exe_scope, value, name))
+    m_jit_vars ()
 {
+    m_flags = flags;
+    m_frozen_sp = ValueObjectConstResult::Create (exe_scope, value, name);
 }
 
 ClangExpressionVariable::ClangExpressionVariable (const lldb::ValueObjectSP &valobj_sp) :
+    ExpressionVariable(),
     m_parser_vars(),
-    m_jit_vars (),
-    m_flags (EVNone),
-    m_frozen_sp (valobj_sp)
+    m_jit_vars ()
 {
+    m_flags = EVNone;
+    m_frozen_sp = valobj_sp;
 }
 
-//----------------------------------------------------------------------
-/// Return the variable's size in bytes
-//----------------------------------------------------------------------
-size_t
-ClangExpressionVariable::GetByteSize ()
-{
-    return m_frozen_sp->GetByteSize();
-}
-
-const ConstString &
-ClangExpressionVariable::GetName ()
-{
-    return m_frozen_sp->GetName();
-}
-
-lldb::ValueObjectSP
-ClangExpressionVariable::GetValueObject()
-{
-    return m_frozen_sp;
-}
-
-RegisterInfo *
-ClangExpressionVariable::GetRegisterInfo()
-{
-    return m_frozen_sp->GetValue().GetRegisterInfo();
-}
-
-void
-ClangExpressionVariable::SetRegisterInfo (const RegisterInfo *reg_info)
-{
-    return m_frozen_sp->GetValue().SetContext (Value::eContextTypeRegisterInfo, const_cast<RegisterInfo *>(reg_info));
-}
-
-CompilerType
-ClangExpressionVariable::GetCompilerType()
-{
-    return m_frozen_sp->GetCompilerType();
-}
-
-void
-ClangExpressionVariable::SetCompilerType(const CompilerType &clang_type)
-{
-    m_frozen_sp->GetValue().SetCompilerType(clang_type);
-}
-
-
 TypeFromUser
 ClangExpressionVariable::GetTypeFromUser()
 {
     TypeFromUser tfu (m_frozen_sp->GetCompilerType());
     return tfu;
 }
-
-uint8_t *
-ClangExpressionVariable::GetValueBytes()
-{
-    const size_t byte_size = m_frozen_sp->GetByteSize();
-    if (byte_size > 0)
-    {
-        if (m_frozen_sp->GetDataExtractor().GetByteSize() < byte_size)
-        {
-            m_frozen_sp->GetValue().ResizeData(byte_size);
-            m_frozen_sp->GetValue().GetData (m_frozen_sp->GetDataExtractor());
-        }
-        return const_cast<uint8_t *>(m_frozen_sp->GetDataExtractor().GetDataStart());
-    }
-    return NULL;
-}
-
-void
-ClangExpressionVariable::SetName (const ConstString &name)
-{
-    m_frozen_sp->SetName (name);
-}
-
-void
-ClangExpressionVariable::ValueUpdated ()
-{
-    m_frozen_sp->ValueUpdated ();
-}
-
-void
-ClangExpressionVariable::TransferAddress (bool force)
-{
-    if (m_live_sp.get() == NULL)
-        return;
-
-    if (m_frozen_sp.get() == NULL)
-        return;
-
-    if (force || (m_frozen_sp->GetLiveAddress() == LLDB_INVALID_ADDRESS))
-        m_frozen_sp->SetLiveAddress(m_live_sp->GetLiveAddress());
-}

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h Fri Sep  4 15:49:51 2015
@@ -26,6 +26,7 @@
 #include "lldb/Core/ClangForward.h"
 #include "lldb/Core/ConstString.h"
 #include "lldb/Core/Value.h"
+#include "lldb/Expression/ExpressionVariable.h"
 #include "lldb/Symbol/TaggedASTType.h"
 
 namespace llvm {
@@ -34,7 +35,6 @@ namespace llvm {
 
 namespace lldb_private {
 
-class ClangExpressionVariableList;
 class ValueObjectConstResult;
 
 //----------------------------------------------------------------------
@@ -60,7 +60,7 @@ class ValueObjectConstResult;
 /// polymorphism, and provides necessary support methods.  Its interface
 /// is RTTI-neutral.
 //----------------------------------------------------------------------
-class ClangExpressionVariable
+class ClangExpressionVariable : public ExpressionVariable
 {
 public:
     ClangExpressionVariable(ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order, uint32_t addr_byte_size);
@@ -71,6 +71,77 @@ public:
                              uint16_t flags = EVNone);
     
     ClangExpressionVariable(const lldb::ValueObjectSP &valobj_sp);
+    
+    ClangExpressionVariable *AsClangExpressionVariable() override
+    {
+        return this;
+    }
+    
+    //----------------------------------------------------------------------
+    /// Utility functions for dealing with ExpressionVariableLists in Clang-specific ways
+    //----------------------------------------------------------------------
+    
+    //----------------------------------------------------------------------
+    /// Finds a variable by NamedDecl in the list.
+    ///
+    /// @param[in] name
+    ///     The name of the requested variable.
+    ///
+    /// @return
+    ///     The variable requested, or NULL if that variable is not in the list.
+    //----------------------------------------------------------------------
+    static ClangExpressionVariable *
+    FindVariableInList (ExpressionVariableList &list, const clang::NamedDecl *decl, uint64_t parser_id)
+    {
+        lldb::ExpressionVariableSP var_sp;
+        for (size_t index = 0, size = list.GetSize(); index < size; ++index)
+        {
+            var_sp = list.GetVariableAtIndex(index);
+            
+            if (ClangExpressionVariable *clang_var = var_sp->AsClangExpressionVariable())
+            {
+                ClangExpressionVariable::ParserVars *parser_vars = clang_var->GetParserVars(parser_id);
+                
+                if (parser_vars && parser_vars->m_named_decl == decl)
+                    return clang_var;
+            }
+        }
+        return nullptr;
+    }
+    
+    static ClangExpressionVariable *
+    CreateVariableInList (ExpressionVariableList &list, ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order, uint32_t addr_byte_size)
+    {
+        ClangExpressionVariable *clang_var = new ClangExpressionVariable(exe_scope, byte_order, addr_byte_size);
+        lldb::ExpressionVariableSP var_sp(clang_var);
+        list.AddVariable(var_sp);
+        return clang_var;
+    }
+    
+    static ClangExpressionVariable *
+    CreateVariableInList (ExpressionVariableList &list, const lldb::ValueObjectSP &valobj_sp)
+    {
+        ClangExpressionVariable *clang_var = new ClangExpressionVariable(valobj_sp);
+        lldb::ExpressionVariableSP var_sp(clang_var);
+        list.AddVariable(var_sp);
+        return clang_var;
+    }
+    
+    static ClangExpressionVariable *
+    CreateVariableInList (ExpressionVariableList &list,
+                          ExecutionContextScope *exe_scope,
+                          const ConstString &name,
+                          const TypeFromUser& user_type,
+                          lldb::ByteOrder byte_order,
+                          uint32_t addr_byte_size)
+    {
+        ClangExpressionVariable *clang_var = new ClangExpressionVariable(exe_scope, byte_order, addr_byte_size);
+        lldb::ExpressionVariableSP var_sp(clang_var);
+        clang_var->SetName (name);
+        clang_var->SetCompilerType (user_type);
+        list.AddVariable(var_sp);
+        return clang_var;
+    }
 
     //----------------------------------------------------------------------
     /// If the variable contains its own data, make a Value point at it.
@@ -90,9 +161,6 @@ public:
     bool
     PointValueAtData(Value &value, ExecutionContext *exe_ctx);
     
-    lldb::ValueObjectSP
-    GetValueObject();
-
     //----------------------------------------------------------------------
     /// The following values should not live beyond parsing
     //----------------------------------------------------------------------
@@ -205,252 +273,16 @@ public:
         else
             return &i->second;
     }
-        
-    //----------------------------------------------------------------------
-    /// Return the variable's size in bytes
-    //----------------------------------------------------------------------
-    size_t 
-    GetByteSize ();
-
-    const ConstString &
-    GetName();
-
-    RegisterInfo *
-    GetRegisterInfo();
-    
-    void
-    SetRegisterInfo (const RegisterInfo *reg_info);
-
-    CompilerType
-    GetCompilerType ();
     
-    void
-    SetCompilerType (const CompilerType &clang_type);
-
     TypeFromUser
     GetTypeFromUser ();
-
-    uint8_t *
-    GetValueBytes ();
-    
-    void
-    SetName (const ConstString &name);
-
-    void
-    ValueUpdated ();
     
-    // this function is used to copy the address-of m_live_sp into m_frozen_sp
-    // this is necessary because the results of certain cast and pointer-arithmetic
-    // operations (such as those described in bugzilla issues 11588 and 11618) generate
-    // frozen objects that do not have a valid address-of, which can be troublesome when
-    // using synthetic children providers. Transferring the address-of the live object
-    // solves these issues and provides the expected user-level behavior
-    void
-    TransferAddress (bool force = false);
-
-    typedef std::shared_ptr<ValueObjectConstResult> ValueObjectConstResultSP;
-
     //----------------------------------------------------------------------
     /// Members
-    //----------------------------------------------------------------------
-    enum Flags 
-    {
-        EVNone                  = 0,
-        EVIsLLDBAllocated       = 1 << 0,   ///< This variable is resident in a location specifically allocated for it by LLDB in the target process
-        EVIsProgramReference    = 1 << 1,   ///< This variable is a reference to a (possibly invalid) area managed by the target program
-        EVNeedsAllocation       = 1 << 2,   ///< Space for this variable has yet to be allocated in the target process
-        EVIsFreezeDried         = 1 << 3,   ///< This variable's authoritative version is in m_frozen_sp (for example, for statically-computed results)
-        EVNeedsFreezeDry        = 1 << 4,   ///< Copy from m_live_sp to m_frozen_sp during dematerialization
-        EVKeepInTarget          = 1 << 5,   ///< Keep the allocation after the expression is complete rather than freeze drying its contents and freeing it
-        EVTypeIsReference       = 1 << 6,   ///< The original type of this variable is a reference, so materialize the value rather than the location
-        EVUnknownType           = 1 << 7,   ///< This is a symbol of unknown type, and the type must be resolved after parsing is complete
-        EVBareRegister          = 1 << 8    ///< This variable is a direct reference to $pc or some other entity.
-    };
-    
-    typedef uint16_t FlagType;
-    
-    FlagType m_flags; // takes elements of Flags
-    
-    lldb::ValueObjectSP m_frozen_sp;
-    lldb::ValueObjectSP m_live_sp;
-    
+    //----------------------------------------------------------------------        
     DISALLOW_COPY_AND_ASSIGN (ClangExpressionVariable);
 };
 
-//----------------------------------------------------------------------
-/// @class ClangExpressionVariableListBase ClangExpressionVariable.h "lldb/Expression/ClangExpressionVariable.h"
-/// @brief A list of variable references.
-///
-/// This class stores variables internally, acting as the permanent store.
-//----------------------------------------------------------------------
-class ClangExpressionVariableList
-{
-public:
-    //----------------------------------------------------------------------
-    /// Implementation of methods in ClangExpressionVariableListBase
-    //----------------------------------------------------------------------
-    size_t 
-    GetSize()
-    {
-        return m_variables.size();
-    }
-    
-    lldb::ClangExpressionVariableSP
-    GetVariableAtIndex(size_t index)
-    {
-        lldb::ClangExpressionVariableSP var_sp;
-        if (index < m_variables.size())
-            var_sp = m_variables[index];
-        return var_sp;
-    }
-    
-    size_t
-    AddVariable (const lldb::ClangExpressionVariableSP &var_sp)
-    {
-        m_variables.push_back(var_sp);
-        return m_variables.size() - 1;
-    }
-
-    bool
-    ContainsVariable (const lldb::ClangExpressionVariableSP &var_sp)
-    {
-        const size_t size = m_variables.size();
-        for (size_t index = 0; index < size; ++index)
-        {
-            if (m_variables[index].get() == var_sp.get())
-                return true;
-        }
-        return false;
-    }
-
-    //----------------------------------------------------------------------
-    /// Finds a variable by name in the list.
-    ///
-    /// @param[in] name
-    ///     The name of the requested variable.
-    ///
-    /// @return
-    ///     The variable requested, or NULL if that variable is not in the list.
-    //----------------------------------------------------------------------
-    lldb::ClangExpressionVariableSP
-    GetVariable (const ConstString &name)
-    {
-        lldb::ClangExpressionVariableSP var_sp;
-        for (size_t index = 0, size = GetSize(); index < size; ++index)
-        {
-            var_sp = GetVariableAtIndex(index);
-            if (var_sp->GetName() == name)
-                return var_sp;
-        }
-        var_sp.reset();
-        return var_sp;
-    }
-
-    lldb::ClangExpressionVariableSP
-    GetVariable (const char *name)
-    {
-        lldb::ClangExpressionVariableSP var_sp;
-        if (name && name[0])
-        {
-            for (size_t index = 0, size = GetSize(); index < size; ++index)
-            {
-                var_sp = GetVariableAtIndex(index);
-                const char *var_name_cstr = var_sp->GetName().GetCString();
-                if (!var_name_cstr || !name)
-                    continue;
-                if (::strcmp (var_name_cstr, name) == 0)
-                    return var_sp;
-            }
-            var_sp.reset();
-        }
-        return var_sp;
-    }
-    
-    //----------------------------------------------------------------------
-    /// Finds a variable by NamedDecl in the list.
-    ///
-    /// @param[in] name
-    ///     The name of the requested variable.
-    ///
-    /// @return
-    ///     The variable requested, or NULL if that variable is not in the list.
-    //----------------------------------------------------------------------
-    lldb::ClangExpressionVariableSP
-    GetVariable (const clang::NamedDecl *decl, uint64_t parser_id)
-    {
-        lldb::ClangExpressionVariableSP var_sp;
-        for (size_t index = 0, size = GetSize(); index < size; ++index)
-        {
-            var_sp = GetVariableAtIndex(index);
-            
-            ClangExpressionVariable::ParserVars *parser_vars = var_sp->GetParserVars(parser_id);
-            
-            if (parser_vars && parser_vars->m_named_decl == decl)
-                return var_sp;
-        }
-        var_sp.reset();
-        return var_sp;
-    }
-
-    //----------------------------------------------------------------------
-    /// Create a new variable in the list and return its index
-    //----------------------------------------------------------------------
-    lldb::ClangExpressionVariableSP
-    CreateVariable (ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order, uint32_t addr_byte_size)
-    {
-        lldb::ClangExpressionVariableSP var_sp(new ClangExpressionVariable(exe_scope, byte_order, addr_byte_size));
-        m_variables.push_back(var_sp);
-        return var_sp;
-    }
-
-    lldb::ClangExpressionVariableSP
-    CreateVariable(const lldb::ValueObjectSP &valobj_sp)
-    {
-        lldb::ClangExpressionVariableSP var_sp(new ClangExpressionVariable(valobj_sp));
-        m_variables.push_back(var_sp);
-        return var_sp;
-    }
-
-    lldb::ClangExpressionVariableSP
-    CreateVariable (ExecutionContextScope *exe_scope,
-                    const ConstString &name, 
-                    const TypeFromUser& user_type,
-                    lldb::ByteOrder byte_order, 
-                    uint32_t addr_byte_size)
-    {
-        lldb::ClangExpressionVariableSP var_sp(new ClangExpressionVariable(exe_scope, byte_order, addr_byte_size));
-        var_sp->SetName (name);
-        var_sp->SetCompilerType (user_type);
-        m_variables.push_back(var_sp);
-        return var_sp;
-    }
-    
-    void
-    RemoveVariable (lldb::ClangExpressionVariableSP var_sp)
-    {
-        for (std::vector<lldb::ClangExpressionVariableSP>::iterator vi = m_variables.begin(), ve = m_variables.end();
-             vi != ve;
-             ++vi)
-        {
-            if (vi->get() == var_sp.get())
-            {
-                m_variables.erase(vi);
-                return;
-            }
-        }
-    }
-    
-    void
-    Clear()
-    {
-        m_variables.clear();
-    }
-
-private:
-    std::vector <lldb::ClangExpressionVariableSP> m_variables;
-};
-
-
 } // namespace lldb_private
 
 #endif  // liblldb_ClangExpressionVariable_h_

Modified: lldb/trunk/source/Target/ABI.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ABI.cpp?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/source/Target/ABI.cpp (original)
+++ lldb/trunk/source/Target/ABI.cpp Fri Sep  4 15:49:51 2015
@@ -141,7 +141,7 @@ ABI::GetReturnValueObject (Thread &threa
         
         return_valobj_sp = const_valobj_sp;
 
-        ClangExpressionVariableSP clang_expr_variable_sp(persistent_variables.CreatePersistentVariable(return_valobj_sp));
+        ExpressionVariableSP clang_expr_variable_sp(persistent_variables.CreatePersistentVariable(return_valobj_sp));
                
         assert (clang_expr_variable_sp.get());
         

Modified: lldb/trunk/source/Target/StopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StopInfo.cpp?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/source/Target/StopInfo.cpp (original)
+++ lldb/trunk/source/Target/StopInfo.cpp Fri Sep  4 15:49:51 2015
@@ -1054,7 +1054,7 @@ class StopInfoThreadPlan : public StopIn
 {
 public:
 
-    StopInfoThreadPlan (ThreadPlanSP &plan_sp, ValueObjectSP &return_valobj_sp, ClangExpressionVariableSP &expression_variable_sp) :
+    StopInfoThreadPlan (ThreadPlanSP &plan_sp, ValueObjectSP &return_valobj_sp, ExpressionVariableSP &expression_variable_sp) :
         StopInfo (plan_sp->GetThread(), LLDB_INVALID_UID),
         m_plan_sp (plan_sp),
         m_return_valobj_sp (return_valobj_sp),
@@ -1090,7 +1090,7 @@ public:
         return m_return_valobj_sp;
     }
     
-    ClangExpressionVariableSP
+    ExpressionVariableSP
     GetExpressionVariable()
     {
         return m_expression_variable_sp;
@@ -1109,7 +1109,7 @@ protected:
 private:
     ThreadPlanSP m_plan_sp;
     ValueObjectSP m_return_valobj_sp;
-    ClangExpressionVariableSP m_expression_variable_sp;
+    ExpressionVariableSP m_expression_variable_sp;
 };
     
 class StopInfoExec : public StopInfo
@@ -1190,7 +1190,7 @@ StopInfo::CreateStopReasonToTrace (Threa
 StopInfoSP
 StopInfo::CreateStopReasonWithPlan (ThreadPlanSP &plan_sp,
                                     ValueObjectSP return_valobj_sp,
-                                    ClangExpressionVariableSP expression_variable_sp)
+                                    ExpressionVariableSP expression_variable_sp)
 {
     return StopInfoSP (new StopInfoThreadPlan (plan_sp, return_valobj_sp, expression_variable_sp));
 }
@@ -1219,7 +1219,7 @@ StopInfo::GetReturnValueObject(StopInfoS
         return ValueObjectSP();
 }
 
-ClangExpressionVariableSP
+ExpressionVariableSP
 StopInfo::GetExpressionVariable(StopInfoSP &stop_info_sp)
 {
     if (stop_info_sp && stop_info_sp->GetStopReason() == eStopReasonPlanComplete)
@@ -1228,5 +1228,5 @@ StopInfo::GetExpressionVariable(StopInfo
         return plan_stop_info->GetExpressionVariable();
     }
     else
-        return ClangExpressionVariableSP();
+        return ExpressionVariableSP();
 }

Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Fri Sep  4 15:49:51 2015
@@ -2032,7 +2032,7 @@ Target::EvaluateExpression
     
     // Make sure we aren't just trying to see the value of a persistent
     // variable (something like "$0")
-    lldb::ClangExpressionVariableSP persistent_var_sp;
+    lldb::ExpressionVariableSP persistent_var_sp;
     // Only check for persistent variables the expression starts with a '$' 
     if (expr_cstr[0] == '$')
         persistent_var_sp = m_persistent_variables->GetVariable (expr_cstr);

Modified: lldb/trunk/source/Target/Thread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Thread.cpp?rev=246871&r1=246870&r2=246871&view=diff
==============================================================================
--- lldb/trunk/source/Target/Thread.cpp (original)
+++ lldb/trunk/source/Target/Thread.cpp Fri Sep  4 15:49:51 2015
@@ -1244,20 +1244,20 @@ Thread::GetReturnValueObject ()
     return ValueObjectSP();
 }
 
-ClangExpressionVariableSP
+ExpressionVariableSP
 Thread::GetExpressionVariable ()
 {
     if (!m_completed_plan_stack.empty())
     {
         for (int i = m_completed_plan_stack.size() - 1; i >= 0; i--)
         {
-            ClangExpressionVariableSP expression_variable_sp;
+            ExpressionVariableSP expression_variable_sp;
             expression_variable_sp = m_completed_plan_stack[i]->GetExpressionVariable();
             if (expression_variable_sp)
                 return expression_variable_sp;
         }
     }
-    return ClangExpressionVariableSP();
+    return ExpressionVariableSP();
 }
 
 bool




More information about the lldb-commits mailing list