summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-05-16 13:34:28 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-05-16 13:34:28 +0000
commit01920cff95cdb9806c176ae7b2830c379ac505d2 (patch)
treef37a69f7eb32f44e4b8881ae9f425fdd38a4f17c /lib/CodeGen/CodeGenModule.cpp
parentbcfa4536b89090c92abb5026aa634c3c1a508ac1 (diff)
downloadclang-01920cff95cdb9806c176ae7b2830c379ac505d2.tar.gz
clang-01920cff95cdb9806c176ae7b2830c379ac505d2.tar.bz2
clang-01920cff95cdb9806c176ae7b2830c379ac505d2.tar.xz
Update for llvm API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208984 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index d9d2eb0fb5..769b01c825 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -2274,9 +2274,9 @@ 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(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::EmitStaticExternCAliases() {
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()));
}
}