From 726d45c548a8f366562d4674418e8bfb7d4a56e7 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Sat, 22 Mar 2008 08:36:14 +0000 Subject: [PATCH] Aliasing chains cleanups: update langref, add check into verifier git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48685 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LangRef.html | 4 ++-- lib/VMCore/Verifier.cpp | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/LangRef.html b/docs/LangRef.html index 41128c3b23a..096acf294a9 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -763,8 +763,8 @@ a power of 2.

Aliases act as "second name" for the aliasee value (which can be either - function or global variable or bitcast of global value). Aliases may have an - optional linkage type, and an + function, global variable, another alias or bitcast of global value). Aliases + may have an optional linkage type, and an optional visibility style.

Syntax:
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 6126253bfb9..f6bc4b9db0d 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -377,7 +377,12 @@ void Verifier::visitGlobalAlias(GlobalAlias &GA) { "Aliasee should be either GlobalValue or bitcast of GlobalValue", &GA); } - + + const GlobalValue* Aliasee = GA.resolveAliasedGlobal(); + Assert1(Aliasee, + "Aliasing chain should end with global function or global variable", + &GA); + visitGlobalValue(GA); }