[llvm] 0b11d01 - [BitCode] decode nossp fn attr
Nick Desaulniers via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 26 13:07:17 PDT 2020
Author: Nick Desaulniers
Date: 2020-10-26T13:06:54-07:00
New Revision: 0b11d018cc2f2c6bea5dac8dc72140cdb502ca02
URL: https://github.com/llvm/llvm-project/commit/0b11d018cc2f2c6bea5dac8dc72140cdb502ca02
DIFF: https://github.com/llvm/llvm-project/commit/0b11d018cc2f2c6bea5dac8dc72140cdb502ca02.diff
LOG: [BitCode] decode nossp fn attr
I missed this in https://reviews.llvm.org/D87956.
Reviewed By: void
Differential Revision: https://reviews.llvm.org/D90177
Added:
Modified:
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/test/Bitcode/attributes.ll
Removed:
################################################################################
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index f8069b93103f..a99d6baa8d9d 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -1537,6 +1537,8 @@ static Attribute::AttrKind getAttrFromCode(uint64_t Code) {
return Attribute::ByRef;
case bitc::ATTR_KIND_MUSTPROGRESS:
return Attribute::MustProgress;
+ case bitc::ATTR_KIND_NO_STACK_PROTECT:
+ return Attribute::NoStackProtect;
}
}
diff --git a/llvm/test/Bitcode/attributes.ll b/llvm/test/Bitcode/attributes.ll
index f87708e83471..4e13bfaa660b 100644
--- a/llvm/test/Bitcode/attributes.ll
+++ b/llvm/test/Bitcode/attributes.ll
@@ -404,6 +404,12 @@ define void @f68() mustprogress
ret void
}
+; CHECK; define void @f69() #42
+define void @f69() nossp
+{
+ ret void
+}
+
; CHECK: attributes #0 = { noreturn }
; CHECK: attributes #1 = { nounwind }
; CHECK: attributes #2 = { readnone }
@@ -446,4 +452,5 @@ define void @f68() mustprogress
; CHECK: attributes #39 = { sanitize_memtag }
; CHECK: attributes #40 = { null_pointer_is_valid }
; CHECK: attributes #41 = { mustprogress }
+; CHECK: attributes #42 = { nossp }
; CHECK: attributes #[[NOBUILTIN]] = { nobuiltin }
More information about the llvm-commits
mailing list