diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-05-16 13:34:28 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-05-16 13:34:28 +0000 |
commit | 9750ce7ebd4d0362c80e8229c78d345c85bac399 (patch) | |
tree | 46bdc1ba55c017ffffa924efe710755562c90c8d /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 4fe0094fd15c9b94e4940994cced3e23baafdb9b (diff) | |
download | llvm-9750ce7ebd4d0362c80e8229c78d345c85bac399.zip llvm-9750ce7ebd4d0362c80e8229c78d345c85bac399.tar.gz llvm-9750ce7ebd4d0362c80e8229c78d345c85bac399.tar.bz2 |
Update for llvm API change.
llvm-svn: 208984
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index d9d2eb0..769b01c 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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())); } } |