aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorAtmn Patel <atmndp@gmail.com>2020-10-20 02:48:18 -0400
committerAtmn Patel <a335pate@uwaterloo.ca>2020-10-20 03:09:57 -0400
commit595c6156068458481395d0f87da16e51a3121a4e (patch)
treeb41c72c4bb5d576213b154983bfd0df27706ebeb /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent08c8d5bc51c512e605840b8003fcf38c86d0fc96 (diff)
downloadllvm-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.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 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: