1*80814287SRaphael Isemann //===-- Expression.cpp ----------------------------------------------------===// 2151c032cSJim Ingham // 32946cd70SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 42946cd70SChandler Carruth // See https://llvm.org/LICENSE.txt for license information. 52946cd70SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6151c032cSJim Ingham // 7151c032cSJim Ingham //===----------------------------------------------------------------------===// 8151c032cSJim Ingham 9151c032cSJim Ingham #include "lldb/Expression/Expression.h" 10151c032cSJim Ingham #include "lldb/Target/ExecutionContextScope.h" 11151c032cSJim Ingham #include "lldb/Target/Target.h" 12151c032cSJim Ingham 13151c032cSJim Ingham using namespace lldb_private; 14151c032cSJim Ingham Expression(Target & target)1552f3a2faSRaphael IsemannExpression::Expression(Target &target) 1652f3a2faSRaphael Isemann : m_target_wp(target.shared_from_this()), 17151c032cSJim Ingham m_jit_start_addr(LLDB_INVALID_ADDRESS), 18b9c1b51eSKate Stone m_jit_end_addr(LLDB_INVALID_ADDRESS) { 19151c032cSJim Ingham // Can't make any kind of expression without a target. 20151c032cSJim Ingham assert(m_target_wp.lock()); 21151c032cSJim Ingham } 22151c032cSJim Ingham Expression(ExecutionContextScope & exe_scope)2352f3a2faSRaphael IsemannExpression::Expression(ExecutionContextScope &exe_scope) 2452f3a2faSRaphael Isemann : m_target_wp(exe_scope.CalculateTarget()), 25151c032cSJim Ingham m_jit_start_addr(LLDB_INVALID_ADDRESS), 26b9c1b51eSKate Stone m_jit_end_addr(LLDB_INVALID_ADDRESS) { 27151c032cSJim Ingham assert(m_target_wp.lock()); 28151c032cSJim Ingham } 29