summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-12-25 14:26:58 +0000
committerdim <dim@FreeBSD.org>2015-12-25 14:26:58 +0000
commit1e9b8d38881c3213d1e67b0c47ab9b2c00721a5c (patch)
tree31a414b9b5f25347b7ed9a8786c34bdb277d6127 /lib/CodeGen/CodeGenModule.cpp
parent4238dc458ed9a048965af111b979fd51d288f22c (diff)
downloadFreeBSD-src-1e9b8d38881c3213d1e67b0c47ab9b2c00721a5c.zip
FreeBSD-src-1e9b8d38881c3213d1e67b0c47ab9b2c00721a5c.tar.gz
Import clang 3.7.1 release (r255217).
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index a179ad4..c9c48c7 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/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);
OpenPOWER on IntegriCloud