mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #40168 from bnbarham/rebranch-failures
[rebranch] Fix compilation failures
This commit is contained in:
@@ -943,8 +943,8 @@ llvm::Constant *swift::getRuntimeFn(llvm::Module &Module,
|
||||
else
|
||||
buildFnAttr.addAttribute(Attr);
|
||||
}
|
||||
fn->addAttributes(llvm::AttributeList::FunctionIndex, buildFnAttr);
|
||||
fn->addAttributes(llvm::AttributeList::ReturnIndex, buildRetAttr);
|
||||
fn->addFnAttrs(buildFnAttr);
|
||||
fn->addRetAttrs(buildRetAttr);
|
||||
fn->addParamAttrs(0, buildFirstParamAttr);
|
||||
}
|
||||
|
||||
@@ -1182,14 +1182,10 @@ void IRGenerator::addBackDeployedObjCActorInitialization(ClassDecl *ClassDecl) {
|
||||
|
||||
llvm::AttributeList IRGenModule::getAllocAttrs() {
|
||||
if (AllocAttrs.isEmpty()) {
|
||||
AllocAttrs = llvm::AttributeList().addRetAttribute(
|
||||
getLLVMContext(), llvm::Attribute::NoAlias);
|
||||
AllocAttrs =
|
||||
llvm::AttributeList::get(getLLVMContext(),
|
||||
llvm::AttributeList::ReturnIndex,
|
||||
llvm::Attribute::NoAlias);
|
||||
AllocAttrs =
|
||||
AllocAttrs.addAttribute(getLLVMContext(),
|
||||
llvm::AttributeList::FunctionIndex,
|
||||
llvm::Attribute::NoUnwind);
|
||||
AllocAttrs.addFnAttribute(getLLVMContext(), llvm::Attribute::NoUnwind);
|
||||
}
|
||||
return AllocAttrs;
|
||||
}
|
||||
@@ -1206,7 +1202,7 @@ void IRGenModule::setHasNoFramePointer(llvm::AttrBuilder &Attrs) {
|
||||
void IRGenModule::setHasNoFramePointer(llvm::Function *F) {
|
||||
llvm::AttrBuilder b;
|
||||
setHasNoFramePointer(b);
|
||||
F->addAttributes(llvm::AttributeList::FunctionIndex, b);
|
||||
F->addFnAttrs(b);
|
||||
}
|
||||
|
||||
/// Construct initial function attributes from options.
|
||||
@@ -1230,8 +1226,7 @@ void IRGenModule::constructInitialFnAttributes(llvm::AttrBuilder &Attrs,
|
||||
llvm::AttributeList IRGenModule::constructInitialAttributes() {
|
||||
llvm::AttrBuilder b;
|
||||
constructInitialFnAttributes(b);
|
||||
return llvm::AttributeList::get(getLLVMContext(),
|
||||
llvm::AttributeList::FunctionIndex, b);
|
||||
return llvm::AttributeList().addFnAttributes(getLLVMContext(), b);
|
||||
}
|
||||
|
||||
llvm::ConstantInt *IRGenModule::getInt32(uint32_t value) {
|
||||
@@ -1247,7 +1242,7 @@ llvm::Constant *IRGenModule::getOpaquePtr(llvm::Constant *ptr) {
|
||||
}
|
||||
|
||||
static void appendEncodedName(raw_ostream &os, StringRef name) {
|
||||
if (clang::isValidIdentifier(name)) {
|
||||
if (clang::isValidAsciiIdentifier(name)) {
|
||||
os << "_" << name;
|
||||
} else {
|
||||
for (auto c : name)
|
||||
|
||||
Reference in New Issue
Block a user