r209074 - Update for llvm api change.
Rafael Espindola
rafael.espindola at gmail.com
Sat May 17 12:58:17 PDT 2014
Author: rafael
Date: Sat May 17 14:58:16 2014
New Revision: 209074
URL: http://llvm.org/viewvc/llvm-project?rev=209074&view=rev
Log:
Update for llvm api change.
Modified:
cfe/trunk/lib/CodeGen/CGCXX.cpp
cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp
cfe/trunk/lib/CodeGen/TargetInfo.cpp
Modified: cfe/trunk/lib/CodeGen/CGCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCXX.cpp?rev=209074&r1=209073&r2=209074&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCXX.cpp Sat May 17 14:58:16 2014
@@ -175,8 +175,8 @@ bool CodeGenModule::TryEmitDefinitionAsA
return true;
// Create the alias with no name.
- auto *Alias = new llvm::GlobalAlias(
- AliasType->getElementType(), Linkage, "", Aliasee, &getModule());
+ auto *Alias = new llvm::GlobalAlias(AliasType->getElementType(), 0, Linkage,
+ "", Aliasee);
// Switch any previous uses to the alias.
if (Entry) {
Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCGNU.cpp?rev=209074&r1=209073&r2=209074&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCGNU.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Sat May 17 14:58:16 2014
@@ -1053,10 +1053,9 @@ llvm::Value *CGObjCGNU::GetSelector(Code
}
}
if (0 == SelValue) {
- SelValue = new llvm::GlobalAlias(SelectorTy->getElementType(),
- llvm::GlobalValue::PrivateLinkage,
- ".objc_selector_"+Sel.getAsString(), NULL,
- &TheModule);
+ SelValue = new llvm::GlobalAlias(
+ SelectorTy->getElementType(), 0, llvm::GlobalValue::PrivateLinkage,
+ ".objc_selector_" + Sel.getAsString(), &TheModule);
Types.push_back(TypedSelector(TypeEncoding, SelValue));
}
@@ -1258,16 +1257,16 @@ CGObjCGNU::GenerateMessageSendSuper(Code
// super_class pointer from either the class or metaclass structure.
if (IsClassMessage) {
if (!MetaClassPtrAlias) {
- MetaClassPtrAlias = new llvm::GlobalAlias(IdTy->getElementType(),
- llvm::GlobalValue::InternalLinkage, ".objc_metaclass_ref" +
- Class->getNameAsString(), NULL, &TheModule);
+ MetaClassPtrAlias = new llvm::GlobalAlias(
+ IdTy->getElementType(), 0, llvm::GlobalValue::InternalLinkage,
+ ".objc_metaclass_ref" + Class->getNameAsString(), &TheModule);
}
ReceiverClass = MetaClassPtrAlias;
} else {
if (!ClassPtrAlias) {
- ClassPtrAlias = new llvm::GlobalAlias(IdTy->getElementType(),
- llvm::GlobalValue::InternalLinkage, ".objc_class_ref" +
- Class->getNameAsString(), NULL, &TheModule);
+ ClassPtrAlias = new llvm::GlobalAlias(
+ IdTy->getElementType(), 0, llvm::GlobalValue::InternalLinkage,
+ ".objc_class_ref" + Class->getNameAsString(), &TheModule);
}
ReceiverClass = ClassPtrAlias;
}
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=209074&r1=209073&r2=209074&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Sat May 17 14:58:16 2014
@@ -2270,9 +2270,9 @@ void CodeGenModule::EmitAliasDefinition(
// Create the new alias itself, but don't set a name yet.
auto *GA = new llvm::GlobalAlias(
- cast<llvm::PointerType>(Aliasee->getType())->getElementType(),
+ cast<llvm::PointerType>(Aliasee->getType())->getElementType(), 0,
llvm::Function::ExternalLinkage, "",
- &getGlobalObjectInExpr(Diags, AA, Aliasee), &getModule());
+ &getGlobalObjectInExpr(Diags, AA, Aliasee));
if (Entry) {
if (GA->getAliasee() == Entry) {
@@ -3197,9 +3197,8 @@ void CodeGenModule::EmitStaticExternCAli
IdentifierInfo *Name = I->first;
llvm::GlobalValue *Val = I->second;
if (Val && !getModule().getNamedValue(Name->getName()))
- addUsedGlobal(new llvm::GlobalAlias(
- Val->getType()->getElementType(), Val->getLinkage(), Name->getName(),
- cast<llvm::GlobalObject>(Val), &getModule()));
+ addUsedGlobal(new llvm::GlobalAlias(Name->getName(),
+ cast<llvm::GlobalObject>(Val)));
}
}
Modified: cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp?rev=209074&r1=209073&r2=209074&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp (original)
+++ cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp Sat May 17 14:58:16 2014
@@ -1627,9 +1627,8 @@ void ItaniumCXXABI::EmitThreadLocalInitF
if (VD->hasDefinition()) {
InitIsInitFunc = true;
if (InitFunc)
- Init = new llvm::GlobalAlias(InitFunc->getType()->getElementType(),
- Var->getLinkage(), InitFnName.str(),
- InitFunc, &CGM.getModule());
+ Init = new llvm::GlobalAlias(Var->getLinkage(), InitFnName.str(),
+ InitFunc);
} else {
// Emit a weak global function referring to the initialization function.
// This function will not exist if the TU defining the thread_local
Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=209074&r1=209073&r2=209074&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Sat May 17 14:58:16 2014
@@ -5211,9 +5211,8 @@ void MSP430TargetCodeGenInfo::SetTargetA
// Step 3: Emit ISR vector alias.
unsigned Num = attr->getNumber() / 2;
- new llvm::GlobalAlias(GV->getType()->getElementType(),
- llvm::Function::ExternalLinkage,
- "__isr_" + Twine(Num), F, &M.getModule());
+ new llvm::GlobalAlias(llvm::Function::ExternalLinkage,
+ "__isr_" + Twine(Num), F);
}
}
}
More information about the cfe-commits
mailing list