Skip to content

Commit

Permalink
Add testcase for prev. commit. Minor fixes
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48686 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
asl committed Mar 22, 2008
1 parent 726d45c commit ef30c1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/VMCore/Verifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,10 @@ void Verifier::visitGlobalAlias(GlobalAlias &GA) {
&GA);
}

const GlobalValue* Aliasee = GA.resolveAliasedGlobal();
const GlobalValue* Aliasee = GA.resolveAliasedGlobal();
Assert1(Aliasee,
"Aliasing chain should end with global function or global variable",
&GA);
"Aliasing chain should end with function or global variable", &GA);

visitGlobalValue(GA);
}
Expand Down
6 changes: 6 additions & 0 deletions test/Verifier/aliasing-chain.ll
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
; RUN: not llvm-as -f %s -o /dev/null |& grep {Aliasing chain should end with function or global variable}

; Test that alising chain does not create a cycle

@b1 = alias i32* @c1
@c1 = alias i32* @b1

0 comments on commit ef30c1d

Please sign in to comment.