[llvm-commits] [llvm] r48685 - in /llvm/trunk: docs/LangRef.html lib/VMCore/Verifier.cpp

Anton Korobeynikov asl at math.spbu.ru
Sat Mar 22 01:36:14 PDT 2008


Author: asl
Date: Sat Mar 22 03:36:14 2008
New Revision: 48685

URL: http://llvm.org/viewvc/llvm-project?rev=48685&view=rev
Log:
Aliasing chains cleanups: update langref, add check into verifier

Modified:
    llvm/trunk/docs/LangRef.html
    llvm/trunk/lib/VMCore/Verifier.cpp

Modified: llvm/trunk/docs/LangRef.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=48685&r1=48684&r2=48685&view=diff

==============================================================================
--- llvm/trunk/docs/LangRef.html (original)
+++ llvm/trunk/docs/LangRef.html Sat Mar 22 03:36:14 2008
@@ -763,8 +763,8 @@
 </div>
 <div class="doc_text">
   <p>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 <a href="#linkage">linkage type</a>, and an
+  function, global variable, another alias or bitcast of global value). Aliases
+  may have an optional <a href="#linkage">linkage type</a>, and an
   optional <a href="#visibility">visibility style</a>.</p>
 
   <h5>Syntax:</h5>

Modified: llvm/trunk/lib/VMCore/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=48685&r1=48684&r2=48685&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/Verifier.cpp (original)
+++ llvm/trunk/lib/VMCore/Verifier.cpp Sat Mar 22 03:36:14 2008
@@ -377,7 +377,12 @@
             "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);
 }
 





More information about the llvm-commits mailing list