We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62f16fe commit 98eead0Copy full SHA for 98eead0
1 file changed
lib/BC/TraceLifter.cpp
@@ -257,11 +257,18 @@ bool TraceLifter::Impl::Lift(
257
auto get_trace_decl = [this](uint64_t trace_addr) -> llvm::Function * {
258
if (auto trace = GetLiftedTraceDeclaration(trace_addr)) {
259
return trace;
260
- } else if (trace_work_list.count(trace_addr)) {
261
- return arch->DeclareLiftedFunction(manager.TraceName(trace_addr), module);
262
- } else {
263
- return nullptr;
264
}
+
+ auto trace_name = manager.TraceName(trace_addr);
+ if (auto trace = module->getFunction(trace_name)) {
+ return trace;
265
+ }
266
267
+ if (trace_work_list.count(trace_addr)) {
268
+ return arch->DeclareLiftedFunction(trace_name, module);
269
270
271
+ return nullptr;
272
};
273
274
trace_work_list.insert(addr);
0 commit comments