diff options
-rw-r--r-- | lib/VMCore/Verifier.cpp | 4 | ||||
-rw-r--r-- | test/Verifier/aliasing-chain.ll | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index f6bc4b9db0..4bcfb1a9db 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -379,9 +379,9 @@ void Verifier::visitGlobalAlias(GlobalAlias &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); } diff --git a/test/Verifier/aliasing-chain.ll b/test/Verifier/aliasing-chain.ll new file mode 100644 index 0000000000..53b929bd78 --- /dev/null +++ b/test/Verifier/aliasing-chain.ll @@ -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 |