aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp31
1 files changed, 4 insertions, 27 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 9bdac5c4..f36dab3 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -1284,28 +1284,10 @@ static uint64_t getRawAttributeMask(Attribute::AttrKind Val) {
return 1ULL << 62;
case Attribute::NoFree:
return 1ULL << 63;
- case Attribute::NoSync:
- llvm_unreachable("nosync attribute not supported in raw format");
- break;
- case Attribute::Dereferenceable:
- llvm_unreachable("dereferenceable attribute not supported in raw format");
- break;
- case Attribute::DereferenceableOrNull:
- llvm_unreachable("dereferenceable_or_null attribute not supported in raw "
- "format");
- break;
- case Attribute::ArgMemOnly:
- llvm_unreachable("argmemonly attribute not supported in raw format");
- break;
- case Attribute::AllocSize:
- llvm_unreachable("allocsize not supported in raw format");
- break;
- case Attribute::SanitizeMemTag:
- llvm_unreachable("sanitize_memtag attribute not supported in raw format");
- break;
- case Attribute::Preallocated:
- llvm_unreachable("preallocated attribute not supported in raw format");
- break;
+ default:
+ // Other attributes are not supported in the raw format,
+ // as we ran out of space.
+ return 0;
}
llvm_unreachable("Unsupported attribute type");
}
@@ -1315,11 +1297,6 @@ static void addRawAttributeValue(AttrBuilder &B, uint64_t Val) {
for (Attribute::AttrKind I = Attribute::None; I != Attribute::EndAttrKinds;
I = Attribute::AttrKind(I + 1)) {
- if (I == Attribute::SanitizeMemTag || I == Attribute::Dereferenceable ||
- I == Attribute::DereferenceableOrNull || I == Attribute::ArgMemOnly ||
- I == Attribute::AllocSize || I == Attribute::NoSync ||
- I == Attribute::Preallocated)
- continue;
if (uint64_t A = (Val & getRawAttributeMask(I))) {
if (I == Attribute::Alignment)
B.addAlignmentAttr(1ULL << ((A >> 16) - 1));