r208984 - Update for llvm API change.
Rafael Espindola
rafael.espindola at gmail.com
Fri May 16 06:34:28 PDT 2014
Author: rafael
Date: Fri May 16 08:34:28 2014
New Revision: 208984
URL: http://llvm.org/viewvc/llvm-project?rev=208984&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=208984&r1=208983&r2=208984&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCXX.cpp Fri May 16 08:34:28 2014
@@ -172,8 +172,8 @@ bool CodeGenModule::TryEmitDefinitionAsA
return true;
// Create the alias with no name.
- llvm::GlobalAlias *Alias =
- new llvm::GlobalAlias(AliasType, Linkage, "", Aliasee, &getModule());
+ auto *Alias = new llvm::GlobalAlias(
+ AliasType->getElementType(), Linkage, "", Aliasee, &getModule());
// 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=208984&r1=208983&r2=208984&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCGNU.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Fri May 16 08:34:28 2014
@@ -1053,7 +1053,7 @@ llvm::Value *CGObjCGNU::GetSelector(Code
}
}
if (0 == SelValue) {
- SelValue = new llvm::GlobalAlias(SelectorTy,
+ SelValue = new llvm::GlobalAlias(SelectorTy->getElementType(),
llvm::GlobalValue::PrivateLinkage,
".objc_selector_"+Sel.getAsString(), NULL,
&TheModule);
@@ -1258,14 +1258,14 @@ CGObjCGNU::GenerateMessageSendSuper(Code
// super_class pointer from either the class or metaclass structure.
if (IsClassMessage) {
if (!MetaClassPtrAlias) {
- MetaClassPtrAlias = new llvm::GlobalAlias(IdTy,
+ MetaClassPtrAlias = new llvm::GlobalAlias(IdTy->getElementType(),
llvm::GlobalValue::InternalLinkage, ".objc_metaclass_ref" +
Class->getNameAsString(), NULL, &TheModule);
}
ReceiverClass = MetaClassPtrAlias;
} else {
if (!ClassPtrAlias) {
- ClassPtrAlias = new llvm::GlobalAlias(IdTy,
+ ClassPtrAlias = new llvm::GlobalAlias(IdTy->getElementType(),
llvm::GlobalValue::InternalLinkage, ".objc_class_ref" +
Class->getNameAsString(), NULL, &TheModule);
}
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=208984&r1=208983&r2=208984&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Fri May 16 08:34:28 2014
@@ -2274,9 +2274,9 @@ void CodeGenModule::EmitAliasDefinition(
llvm::PointerType::getUnqual(DeclTy), 0);
// Create the new alias itself, but don't set a name yet.
- auto *GA =
- new llvm::GlobalAlias(Aliasee->getType(), llvm::Function::ExternalLinkage,
- "", Aliasee, &getModule());
+ auto *GA = new llvm::GlobalAlias(
+ cast<llvm::PointerType>(Aliasee->getType())->getElementType(),
+ llvm::Function::ExternalLinkage, "", Aliasee, &getModule());
if (Entry) {
assert(Entry->isDeclaration());
@@ -3196,8 +3196,9 @@ void CodeGenModule::EmitStaticExternCAli
IdentifierInfo *Name = I->first;
llvm::GlobalValue *Val = I->second;
if (Val && !getModule().getNamedValue(Name->getName()))
- addUsedGlobal(new llvm::GlobalAlias(Val->getType(), Val->getLinkage(),
- Name->getName(), Val, &getModule()));
+ addUsedGlobal(new llvm::GlobalAlias(Val->getType()->getElementType(),
+ Val->getLinkage(), Name->getName(),
+ Val, &getModule()));
}
}
Modified: cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp?rev=208984&r1=208983&r2=208984&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp (original)
+++ cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp Fri May 16 08:34:28 2014
@@ -1627,9 +1627,9 @@ void ItaniumCXXABI::EmitThreadLocalInitF
if (VD->hasDefinition()) {
InitIsInitFunc = true;
if (InitFunc)
- Init =
- new llvm::GlobalAlias(InitFunc->getType(), Var->getLinkage(),
- InitFnName.str(), InitFunc, &CGM.getModule());
+ Init = new llvm::GlobalAlias(InitFunc->getType()->getElementType(),
+ Var->getLinkage(), InitFnName.str(),
+ InitFunc, &CGM.getModule());
} 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=208984&r1=208983&r2=208984&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Fri May 16 08:34:28 2014
@@ -5211,9 +5211,9 @@ void MSP430TargetCodeGenInfo::SetTargetA
// Step 3: Emit ISR vector alias.
unsigned Num = attr->getNumber() / 2;
- new llvm::GlobalAlias(GV->getType(), llvm::Function::ExternalLinkage,
- "__isr_" + Twine(Num),
- GV, &M.getModule());
+ new llvm::GlobalAlias(GV->getType()->getElementType(),
+ llvm::Function::ExternalLinkage,
+ "__isr_" + Twine(Num), GV, &M.getModule());
}
}
}
More information about the cfe-commits
mailing list