1*9f2f44ceSEd Maste //===-- Expression.h ---------------------------------------*- C++ -*-===//
2*9f2f44ceSEd Maste //
3*9f2f44ceSEd Maste //                     The LLVM Compiler Infrastructure
4*9f2f44ceSEd Maste //
5*9f2f44ceSEd Maste // This file is distributed under the University of Illinois Open Source
6*9f2f44ceSEd Maste // License. See LICENSE.TXT for details.
7*9f2f44ceSEd Maste //
8*9f2f44ceSEd Maste //===----------------------------------------------------------------------===//
9*9f2f44ceSEd Maste 
10*9f2f44ceSEd Maste #include "lldb/Expression/Expression.h"
11*9f2f44ceSEd Maste #include "lldb/Target/ExecutionContextScope.h"
12*9f2f44ceSEd Maste #include "lldb/Target/Target.h"
13*9f2f44ceSEd Maste 
14*9f2f44ceSEd Maste using namespace lldb_private;
15*9f2f44ceSEd Maste 
16*9f2f44ceSEd Maste Expression::Expression (Target &target) :
17*9f2f44ceSEd Maste     m_target_wp (target.shared_from_this()),
18*9f2f44ceSEd Maste     m_jit_start_addr (LLDB_INVALID_ADDRESS),
19*9f2f44ceSEd Maste     m_jit_end_addr (LLDB_INVALID_ADDRESS)
20*9f2f44ceSEd Maste {
21*9f2f44ceSEd Maste     // Can't make any kind of expression without a target.
22*9f2f44ceSEd Maste     assert (m_target_wp.lock());
23*9f2f44ceSEd Maste }
24*9f2f44ceSEd Maste 
25*9f2f44ceSEd Maste Expression::Expression (ExecutionContextScope &exe_scope) :
26*9f2f44ceSEd Maste     m_target_wp (exe_scope.CalculateTarget()),
27*9f2f44ceSEd Maste     m_jit_start_addr (LLDB_INVALID_ADDRESS),
28*9f2f44ceSEd Maste     m_jit_end_addr (LLDB_INVALID_ADDRESS)
29*9f2f44ceSEd Maste {
30*9f2f44ceSEd Maste     assert (m_target_wp.lock());
31*9f2f44ceSEd Maste }
32*9f2f44ceSEd Maste 
33