From 14b1e453e4d61b80dc783e903198e65e69d281df Mon Sep 17 00:00:00 2001 From: Steven Johnson Date: Tue, 19 Apr 2022 16:30:57 -0700 Subject: [PATCH] Closure functions for parallel tasks should be internal, not external Minor optimization. --- src/LowerParallelTasks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LowerParallelTasks.cpp b/src/LowerParallelTasks.cpp index 73d0dd4c8504..e5da5164c574 100644 --- a/src/LowerParallelTasks.cpp +++ b/src/LowerParallelTasks.cpp @@ -292,7 +292,7 @@ struct LowerParallelTasks : public IRMutator { // TODO(zvookin): Figure out how we want to handle name mangling of closures. // For now, the C++ backend makes them extern "C" so they have to be NameMangling::C. - LoweredFunc closure_func{new_function_name, closure_args, std::move(wrapped_body), LinkageType::External, NameMangling::C}; + LoweredFunc closure_func{new_function_name, closure_args, std::move(wrapped_body), LinkageType::Internal, NameMangling::C}; if (target.has_feature(Target::Debug)) { debug_arguments(&closure_func, target); }