r207991 - Small refactoring, no functionality change.
Rafael Espindola
rafael.espindola at gmail.com
Mon May 5 12:33:09 PDT 2014
Author: rafael
Date: Mon May 5 14:33:09 2014
New Revision: 207991
URL: http://llvm.org/viewvc/llvm-project?rev=207991&view=rev
Log:
Small refactoring, no functionality change.
Modified:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=207991&r1=207990&r2=207991&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Mon May 5 14:33:09 2014
@@ -220,6 +220,7 @@ void CodeGenModule::checkAliases() {
// that we have to do this in CodeGen, but we only construct mangled names
// and aliases during codegen.
bool Error = false;
+ DiagnosticsEngine &Diags = getDiags();
for (std::vector<GlobalDecl>::iterator I = Aliases.begin(),
E = Aliases.end(); I != E; ++I) {
const GlobalDecl &GD = *I;
@@ -231,10 +232,10 @@ void CodeGenModule::checkAliases() {
llvm::GlobalValue *GV = Alias->getAliasedGlobal();
if (!GV) {
Error = true;
- getDiags().Report(AA->getLocation(), diag::err_cyclic_alias);
+ Diags.Report(AA->getLocation(), diag::err_cyclic_alias);
} else if (GV->isDeclaration()) {
Error = true;
- getDiags().Report(AA->getLocation(), diag::err_alias_to_undefined);
+ Diags.Report(AA->getLocation(), diag::err_alias_to_undefined);
}
// We have to handle alias to weak aliases in here. LLVM itself disallows
@@ -254,7 +255,7 @@ void CodeGenModule::checkAliases() {
}
if (auto GA = dyn_cast<llvm::GlobalAlias>(AliaseeGV)) {
if (GA->mayBeOverridden()) {
- getDiags().Report(AA->getLocation(), diag::warn_alias_to_weak_alias)
+ Diags.Report(AA->getLocation(), diag::warn_alias_to_weak_alias)
<< GA->getAliasedGlobal()->getName() << GA->getName();
Aliasee = llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(
GA->getAliasee(), Alias->getType());
More information about the cfe-commits
mailing list