diff --git a/Sources/LLVM/Function+Attributes.swift b/Sources/LLVM/Function+Attributes.swift index ae708e12..10aa59a5 100644 --- a/Sources/LLVM/Function+Attributes.swift +++ b/Sources/LLVM/Function+Attributes.swift @@ -343,17 +343,6 @@ extension Function { /// - parameter index: The index representing the function, its return value /// or one of its parameters. public func removeAttribute(_ attrKind: AttributeKind, from index: AttributeIndex) { - // FIXME: Remove when LLVM 7.0.0 is released. - guard attrKind != .align - && attrKind != .alignstack - && attrKind != .allocsize - && attrKind != .dereferenceable - && attrKind != .dereferenceableOrNull else { - fatalError( - "Removing valued enum attributes crashes in LLVM <7.0.0 " + - "and is currently disabled in LLVMSwift.") - } - LLVMRemoveEnumAttributeAtIndex(llvm, index.rawValue, attrKind.id) } diff --git a/Tests/LLVMTests/IRAttributesSpec.swift b/Tests/LLVMTests/IRAttributesSpec.swift index 4aa79f55..0b6df6db 100644 --- a/Tests/LLVMTests/IRAttributesSpec.swift +++ b/Tests/LLVMTests/IRAttributesSpec.swift @@ -131,9 +131,6 @@ class IRAttributesSpec : XCTestCase { XCTAssertEqual(enumAttr.value, value) XCTAssert(fn.attributes(at: .function).contains { $0.asLLVM() == enumAttr.asLLVM() }) - // FIXME: Remove when LLVM 7.0.0 is released. - guard value == 0 else { continue } - fn.removeAttribute(enumAttr, from: .function) XCTAssertFalse(fn.attributes(at: .function).contains { $0.asLLVM() == enumAttr.asLLVM() }) @@ -195,9 +192,6 @@ class IRAttributesSpec : XCTestCase { XCTAssertEqual(enumAttr.value, value) XCTAssert(fn.attributes(at: .returnValue).contains { $0.asLLVM() == enumAttr.asLLVM() }) - // FIXME: Remove when LLVM 7.0.0 is released. - guard value == 0 else { continue } - fn.removeAttribute(enumAttr, from: .returnValue) XCTAssertFalse(fn.attributes(at: .returnValue).contains { $0.asLLVM() == enumAttr.asLLVM() }) @@ -211,9 +205,6 @@ class IRAttributesSpec : XCTestCase { XCTAssertEqual(enumAttr.value, value) XCTAssert(fn.attributes(at: .argument(0)).contains { $0.asLLVM() == enumAttr.asLLVM() }) - // FIXME: Remove when LLVM 7.0.0 is released. - guard value == 0 else { continue } - fn.removeAttribute(enumAttr, from: .argument(0)) XCTAssertFalse(fn.attributes(at: .argument(0)).contains { $0.asLLVM() == enumAttr.asLLVM() })