Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / source / Expression / Expression.cpp
blob93f585edfce3d0c4be1d711ee67728a2497d67e1
1 //===-- Expression.cpp ----------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "lldb/Expression/Expression.h"
10 #include "lldb/Target/ExecutionContextScope.h"
11 #include "lldb/Target/Target.h"
13 using namespace lldb_private;
15 Expression::Expression(Target &target)
16 : m_target_wp(target.shared_from_this()),
17 m_jit_start_addr(LLDB_INVALID_ADDRESS),
18 m_jit_end_addr(LLDB_INVALID_ADDRESS) {
19 // Can't make any kind of expression without a target.
20 assert(m_target_wp.lock());
23 Expression::Expression(ExecutionContextScope &exe_scope)
24 : m_target_wp(exe_scope.CalculateTarget()),
25 m_jit_start_addr(LLDB_INVALID_ADDRESS),
26 m_jit_end_addr(LLDB_INVALID_ADDRESS) {
27 assert(m_target_wp.lock());