From 6f44a590dad07c47cdc2fc19861574af1da36963 Mon Sep 17 00:00:00 2001 From: dim Date: Fri, 25 Dec 2015 21:39:45 +0000 Subject: Upgrade our copies of clang and llvm to 3.7.1 release. This is a bugfix-only release, with no new features. Please note that from 3.5.0 onwards, clang and llvm require C++11 support to build; see UPDATING for more information. --- contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp b/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp index a179ad4..c9c48c7 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp +++ b/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp @@ -2493,6 +2493,11 @@ void CodeGenModule::EmitAliasDefinition(GlobalDecl GD) { StringRef MangledName = getMangledName(GD); + if (AA->getAliasee() == MangledName) { + Diags.Report(AA->getLocation(), diag::err_cyclic_alias); + return; + } + // If there is a definition in the module, then it wins over the alias. // This is dubious, but allow it to be safe. Just ignore the alias. llvm::GlobalValue *Entry = GetGlobalValue(MangledName); -- cgit v1.1