mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
IRGen: Enable usage of attributes from RuntimeFunctions.def
* Add some ZExt function attributes on functions returning bool * swift_dynamicCast is not readonly as it writes to the 'dest' buffer * Fix tail_alloc.sil test rdar://20802330
This commit is contained in:
@@ -468,18 +468,16 @@ llvm::Constant *swift::getRuntimeFn(llvm::Module &Module,
|
||||
}
|
||||
// FIXME: getting attributes here without setting them does
|
||||
// nothing. This cannot be fixed until the attributes are correctly specified.
|
||||
fn->getAttributes().
|
||||
addAttributes(Module.getContext(),
|
||||
llvm::AttributeSet::FunctionIndex,
|
||||
llvm::AttributeSet::get(Module.getContext(),
|
||||
llvm::AttributeSet::FunctionIndex,
|
||||
buildFnAttr));
|
||||
fn->getAttributes().
|
||||
addAttributes(Module.getContext(),
|
||||
llvm::AttributeSet::ReturnIndex,
|
||||
llvm::AttributeSet::get(Module.getContext(),
|
||||
llvm::AttributeSet::ReturnIndex,
|
||||
buildRetAttr));
|
||||
fn->setAttributes(fn->getAttributes().addAttributes(
|
||||
Module.getContext(), llvm::AttributeSet::FunctionIndex,
|
||||
llvm::AttributeSet::get(Module.getContext(),
|
||||
llvm::AttributeSet::FunctionIndex,
|
||||
buildFnAttr)));
|
||||
fn->setAttributes(fn->getAttributes().addAttributes(
|
||||
Module.getContext(), llvm::AttributeSet::ReturnIndex,
|
||||
llvm::AttributeSet::get(Module.getContext(),
|
||||
llvm::AttributeSet::ReturnIndex,
|
||||
buildRetAttr)));
|
||||
}
|
||||
|
||||
return cache;
|
||||
|
||||
Reference in New Issue
Block a user