summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGCoroutine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGCoroutine.cpp')
-rw-r--r--clang/lib/CodeGen/CGCoroutine.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGCoroutine.cpp b/clang/lib/CodeGen/CGCoroutine.cpp
index 2041d2a5b4c9..c1763cbbc5a0 100644
--- a/clang/lib/CodeGen/CGCoroutine.cpp
+++ b/clang/lib/CodeGen/CGCoroutine.cpp
@@ -707,6 +707,10 @@ void CodeGenFunction::EmitCoroutineBody(const CoroutineBodyStmt &S) {
if (Stmt *Ret = S.getReturnStmt())
EmitStmt(Ret);
+
+ // LLVM require the frontend to add the function attribute. See
+ // Coroutines.rst.
+ CurFn->addFnAttr("coroutine.presplit", "0");
}
// Emit coroutine intrinsic and patch up arguments of the token type.