r236161 - [opaque pointer type] update for LLVM API change
David Blaikie
dblaikie at gmail.com
Wed Apr 29 14:22:47 PDT 2015
Author: dblaikie
Date: Wed Apr 29 16:22:47 2015
New Revision: 236161
URL: http://llvm.org/viewvc/llvm-project?rev=236161&view=rev
Log:
[opaque pointer type] 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/MicrosoftCXXABI.cpp
Modified: cfe/trunk/lib/CodeGen/CGCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCXX.cpp?rev=236161&r1=236160&r2=236161&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCXX.cpp Wed Apr 29 16:22:47 2015
@@ -182,8 +182,8 @@ bool CodeGenModule::TryEmitDefinitionAsA
return true;
// Create the alias with no name.
- auto *Alias = llvm::GlobalAlias::create(AliasType->getElementType(), 0,
- Linkage, "", Aliasee, &getModule());
+ auto *Alias =
+ llvm::GlobalAlias::create(AliasType, 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=236161&r1=236160&r2=236161&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCGNU.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Wed Apr 29 16:22:47 2015
@@ -1060,7 +1060,7 @@ llvm::Value *CGObjCGNU::GetSelector(Code
}
if (!SelValue) {
SelValue = llvm::GlobalAlias::create(
- SelectorTy->getElementType(), 0, llvm::GlobalValue::PrivateLinkage,
+ SelectorTy, llvm::GlobalValue::PrivateLinkage,
".objc_selector_" + Sel.getAsString(), &TheModule);
Types.push_back(TypedSelector(TypeEncoding, SelValue));
}
@@ -1266,14 +1266,14 @@ CGObjCGNU::GenerateMessageSendSuper(Code
if (IsClassMessage) {
if (!MetaClassPtrAlias) {
MetaClassPtrAlias = llvm::GlobalAlias::create(
- IdTy->getElementType(), 0, llvm::GlobalValue::InternalLinkage,
+ IdTy, llvm::GlobalValue::InternalLinkage,
".objc_metaclass_ref" + Class->getNameAsString(), &TheModule);
}
ReceiverClass = MetaClassPtrAlias;
} else {
if (!ClassPtrAlias) {
ClassPtrAlias = llvm::GlobalAlias::create(
- IdTy->getElementType(), 0, llvm::GlobalValue::InternalLinkage,
+ IdTy, 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=236161&r1=236160&r2=236161&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Wed Apr 29 16:22:47 2015
@@ -2523,7 +2523,7 @@ void CodeGenModule::EmitAliasDefinition(
// Create the new alias itself, but don't set a name yet.
auto *GA = llvm::GlobalAlias::create(
- cast<llvm::PointerType>(Aliasee->getType())->getElementType(), 0,
+ cast<llvm::PointerType>(Aliasee->getType()),
llvm::Function::ExternalLinkage, "", Aliasee, &getModule());
if (Entry) {
Modified: cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp?rev=236161&r1=236160&r2=236161&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp (original)
+++ cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp Wed Apr 29 16:22:47 2015
@@ -3220,8 +3220,8 @@ static void emitConstructorDestructorAli
llvm::PointerType *AliasType = Aliasee->getType();
// Create the alias with no name.
- auto *Alias = llvm::GlobalAlias::create(
- AliasType->getElementType(), 0, Linkage, "", Aliasee, &CGM.getModule());
+ auto *Alias = llvm::GlobalAlias::create(AliasType, Linkage, "", Aliasee,
+ &CGM.getModule());
// Switch any previous uses to the alias.
if (Entry) {
Modified: cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp?rev=236161&r1=236160&r2=236161&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp (original)
+++ cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp Wed Apr 29 16:22:47 2015
@@ -1560,9 +1560,8 @@ llvm::GlobalVariable *MicrosoftCXXABI::g
C->setSelectionKind(llvm::Comdat::Largest);
}
VFTable = llvm::GlobalAlias::create(
- cast<llvm::SequentialType>(VTableGEP->getType())->getElementType(),
- /*AddressSpace=*/0, VFTableLinkage, VFTableName.str(), VTableGEP,
- &CGM.getModule());
+ cast<llvm::PointerType>(VTableGEP->getType()), VFTableLinkage,
+ VFTableName.str(), VTableGEP, &CGM.getModule());
VFTable->setUnnamedAddr(true);
} else {
// We don't need a GlobalAlias to be a symbol for the VTable if we won't
More information about the cfe-commits
mailing list