aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorGui Andrade <guiand@google.com>2020-07-08 17:22:48 +0000
committerGui Andrade <guiand@google.com>2020-07-08 19:02:04 +0000
commitff7900d5def4f645a6675d99ad39a38d8a468a63 (patch)
tree50011f479599395d5606309e610e95d883a884f6 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent89f1ad88b3f1ecf32e797247b9eab5662ed4bcf4 (diff)
downloadllvm-ff7900d5def4f645a6675d99ad39a38d8a468a63.zip
llvm-ff7900d5def4f645a6675d99ad39a38d8a468a63.tar.gz
llvm-ff7900d5def4f645a6675d99ad39a38d8a468a63.tar.bz2
[LLVM] Accept `noundef` attribute in function definitions/calls
The `noundef` attribute indicates an argument or return value which may never have an undef value representation. This patch allows LLVM to parse the attribute. Differential Revision: https://reviews.llvm.org/D83412
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index dceb492..659e26c 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -1530,6 +1530,8 @@ static Attribute::AttrKind getAttrFromCode(uint64_t Code) {
return Attribute::SanitizeMemTag;
case bitc::ATTR_KIND_PREALLOCATED:
return Attribute::Preallocated;
+ case bitc::ATTR_KIND_NOUNDEF:
+ return Attribute::NoUndef;
}
}