forked from OSchip/llvm-project
parent
f1bedd3747
commit
234405bd0f
|
@ -175,8 +175,8 @@ bool CodeGenModule::TryEmitDefinitionAsAlias(GlobalDecl AliasDecl,
|
|||
return true;
|
||||
|
||||
// Create the alias with no name.
|
||||
auto *Alias = new llvm::GlobalAlias(AliasType->getElementType(), 0, Linkage,
|
||||
"", Aliasee);
|
||||
auto *Alias = llvm::GlobalAlias::create(AliasType->getElementType(), 0,
|
||||
Linkage, "", Aliasee);
|
||||
|
||||
// Switch any previous uses to the alias.
|
||||
if (Entry) {
|
||||
|
|
|
@ -1053,7 +1053,7 @@ llvm::Value *CGObjCGNU::GetSelector(CodeGenFunction &CGF, Selector Sel,
|
|||
}
|
||||
}
|
||||
if (0 == SelValue) {
|
||||
SelValue = new llvm::GlobalAlias(
|
||||
SelValue = llvm::GlobalAlias::create(
|
||||
SelectorTy->getElementType(), 0, llvm::GlobalValue::PrivateLinkage,
|
||||
".objc_selector_" + Sel.getAsString(), &TheModule);
|
||||
Types.push_back(TypedSelector(TypeEncoding, SelValue));
|
||||
|
@ -1257,14 +1257,14 @@ CGObjCGNU::GenerateMessageSendSuper(CodeGenFunction &CGF,
|
|||
// super_class pointer from either the class or metaclass structure.
|
||||
if (IsClassMessage) {
|
||||
if (!MetaClassPtrAlias) {
|
||||
MetaClassPtrAlias = new llvm::GlobalAlias(
|
||||
MetaClassPtrAlias = llvm::GlobalAlias::create(
|
||||
IdTy->getElementType(), 0, llvm::GlobalValue::InternalLinkage,
|
||||
".objc_metaclass_ref" + Class->getNameAsString(), &TheModule);
|
||||
}
|
||||
ReceiverClass = MetaClassPtrAlias;
|
||||
} else {
|
||||
if (!ClassPtrAlias) {
|
||||
ClassPtrAlias = new llvm::GlobalAlias(
|
||||
ClassPtrAlias = llvm::GlobalAlias::create(
|
||||
IdTy->getElementType(), 0, llvm::GlobalValue::InternalLinkage,
|
||||
".objc_class_ref" + Class->getNameAsString(), &TheModule);
|
||||
}
|
||||
|
|
|
@ -2269,7 +2269,7 @@ void CodeGenModule::EmitAliasDefinition(GlobalDecl GD) {
|
|||
llvm::PointerType::getUnqual(DeclTy), 0);
|
||||
|
||||
// Create the new alias itself, but don't set a name yet.
|
||||
auto *GA = new llvm::GlobalAlias(
|
||||
auto *GA = llvm::GlobalAlias::create(
|
||||
cast<llvm::PointerType>(Aliasee->getType())->getElementType(), 0,
|
||||
llvm::Function::ExternalLinkage, "",
|
||||
&getGlobalObjectInExpr(Diags, AA, Aliasee));
|
||||
|
@ -3197,7 +3197,7 @@ void CodeGenModule::EmitStaticExternCAliases() {
|
|||
IdentifierInfo *Name = I->first;
|
||||
llvm::GlobalValue *Val = I->second;
|
||||
if (Val && !getModule().getNamedValue(Name->getName()))
|
||||
addUsedGlobal(new llvm::GlobalAlias(Name->getName(),
|
||||
addUsedGlobal(llvm::GlobalAlias::create(Name->getName(),
|
||||
cast<llvm::GlobalObject>(Val)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1627,7 +1627,7 @@ void ItaniumCXXABI::EmitThreadLocalInitFuncs(
|
|||
if (VD->hasDefinition()) {
|
||||
InitIsInitFunc = true;
|
||||
if (InitFunc)
|
||||
Init = new llvm::GlobalAlias(Var->getLinkage(), InitFnName.str(),
|
||||
Init = llvm::GlobalAlias::create(Var->getLinkage(), InitFnName.str(),
|
||||
InitFunc);
|
||||
} else {
|
||||
// Emit a weak global function referring to the initialization function.
|
||||
|
|
|
@ -5211,7 +5211,7 @@ void MSP430TargetCodeGenInfo::SetTargetAttributes(const Decl *D,
|
|||
|
||||
// Step 3: Emit ISR vector alias.
|
||||
unsigned Num = attr->getNumber() / 2;
|
||||
new llvm::GlobalAlias(llvm::Function::ExternalLinkage,
|
||||
llvm::GlobalAlias::create(llvm::Function::ExternalLinkage,
|
||||
"__isr_" + Twine(Num), F);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue