diff options
author | Atmn Patel <atmndp@gmail.com> | 2020-10-20 02:48:18 -0400 |
---|---|---|
committer | Atmn Patel <a335pate@uwaterloo.ca> | 2020-10-20 03:09:57 -0400 |
commit | 595c6156068458481395d0f87da16e51a3121a4e (patch) | |
tree | b41c72c4bb5d576213b154983bfd0df27706ebeb /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 08c8d5bc51c512e605840b8003fcf38c86d0fc96 (diff) | |
download | llvm-595c6156068458481395d0f87da16e51a3121a4e.zip llvm-595c6156068458481395d0f87da16e51a3121a4e.tar.gz llvm-595c6156068458481395d0f87da16e51a3121a4e.tar.bz2 |
[IR] Adds mustprogress as a LLVM IR attribute
This adds the LLVM IR attribute `mustprogress` as defined in LangRef through D86233. This attribute will be applied to functions with in languages like C++ where forward progress is guaranteed. Functions without this attribute are not required to make progress.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D85393
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 125125c..0b2b1d6 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -743,6 +743,8 @@ static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind) { return bitc::ATTR_KIND_NOUNDEF; case Attribute::ByRef: return bitc::ATTR_KIND_BYREF; + case Attribute::MustProgress: + return bitc::ATTR_KIND_MUSTPROGRESS; case Attribute::EndAttrKinds: llvm_unreachable("Can not encode end-attribute kinds marker."); case Attribute::None: |