aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>2022-06-10 11:37:09 +0800
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>2022-06-14 14:23:46 +0800
commit735e6c40b5e9a128820f009595de4728e5d6b3d5 (patch)
tree4efb176e16c1ffd4e37db3005093544c90064553 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parenta2232da2a5d207126e1777fb33b61a16109ae38e (diff)
downloadllvm-735e6c40b5e9a128820f009595de4728e5d6b3d5.zip
llvm-735e6c40b5e9a128820f009595de4728e5d6b3d5.tar.gz
llvm-735e6c40b5e9a128820f009595de4728e5d6b3d5.tar.bz2
[Coroutines] Convert coroutine.presplit to enum attr
This is required by @nikic in https://reviews.llvm.org/D127383 to decrease the cost to check whether a function is a coroutine and this fixes a FIXME too. Reviewed By: rjmccall, ezhulenev Differential Revision: https://reviews.llvm.org/D127471
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index a8a6b3f..f5ccc80 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -774,6 +774,8 @@ static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind) {
return bitc::ATTR_KIND_BYREF;
case Attribute::MustProgress:
return bitc::ATTR_KIND_MUSTPROGRESS;
+ case Attribute::PresplitCoroutine:
+ return bitc::ATTR_KIND_PRESPLIT_COROUTINE;
case Attribute::EndAttrKinds:
llvm_unreachable("Can not encode end-attribute kinds marker.");
case Attribute::None: