Skip to content

Commit 6cfc330

Browse files
committed
Minor improvement
1 parent f62f0d0 commit 6cfc330

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/tools/sycl-post-link/sycl-post-link.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,10 @@ static HasAssertStatus hasAssertInFunctionCallGraph(llvm::Function *Func) {
311311
FuncCallStack.push_back(F);
312312

313313
bool HasIndirectlyCalledAttr = false;
314-
if (F->hasFnAttribute("referenced-indirectly")) {
314+
if (F->hasFnAttribute("referenced-indirectly") ||
315+
std::find(isIndirectlyCalledInGraph.begin(),
316+
isIndirectlyCalledInGraph.end(),
317+
F) != isIndirectlyCalledInGraph.end()) {
315318
HasIndirectlyCalledAttr = true;
316319
isIndirectlyCalledInGraph.push_back(F);
317320
}

0 commit comments

Comments
 (0)