Skip to content

Commit 8ba3303

Browse files
author
Davide Italiano
committed
[ClangExpressionParser] Remove unneded divergence from upstream.
apple-llvm-split-commit: 1b37dcdf50c5484f9f73851ac8489ce3ab94ec82 apple-llvm-split-dir: lldb/
1 parent 2a1c851 commit 8ba3303

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,18 @@ bool ClangUtilityFunction::Install(DiagnosticManager &diagnostic_manager,
121121

122122
if (m_jit_start_addr != LLDB_INVALID_ADDRESS) {
123123
m_jit_process_wp = process->shared_from_this();
124-
if (parser.GetGenerateDebugInfo())
125-
m_execution_unit_sp->CreateJITModule(FunctionName());
124+
if (parser.GetGenerateDebugInfo()) {
125+
lldb::ModuleSP jit_module_sp(m_execution_unit_sp->GetJITModule());
126+
127+
if (jit_module_sp) {
128+
ConstString const_func_name(FunctionName());
129+
FileSpec jit_file;
130+
jit_file.GetFilename() = const_func_name;
131+
jit_module_sp->SetFileSpecAndObjectName(jit_file, ConstString());
132+
m_jit_module_wp = jit_module_sp;
133+
target->GetImages().Append(jit_module_sp);
134+
}
135+
}
126136
}
127137

128138
DeclMap()->DidParse();

0 commit comments

Comments
 (0)