Skip to content

Commit 15c1ab2

Browse files
committed
[Attributes] Remove special SRet/ByVal attribute handling in C API
Proper construction functions for these have long since been exposed, and these attributes require a type nowadays, so drop the old compatibility code.
1 parent 884bb97 commit 15c1ab2

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

llvm/lib/IR/Core.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -147,18 +147,6 @@ LLVMAttributeRef LLVMCreateEnumAttribute(LLVMContextRef C, unsigned KindID,
147147
uint64_t Val) {
148148
auto &Ctx = *unwrap(C);
149149
auto AttrKind = (Attribute::AttrKind)KindID;
150-
151-
if (AttrKind == Attribute::AttrKind::ByVal) {
152-
// After r362128, byval attributes need to have a type attribute. Provide a
153-
// NULL one until a proper API is added for this.
154-
return wrap(Attribute::getWithByValType(Ctx, nullptr));
155-
}
156-
157-
if (AttrKind == Attribute::AttrKind::StructRet) {
158-
// Same as byval.
159-
return wrap(Attribute::getWithStructRetType(Ctx, nullptr));
160-
}
161-
162150
return wrap(Attribute::get(Ctx, AttrKind, Val));
163151
}
164152

0 commit comments

Comments
 (0)