summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-03-22 08:37:05 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-03-22 08:37:05 +0000
commit3f7fab913dba196cbb12ccabc61876c208887d49 (patch)
tree32d79d2a3899a91790630cc47c2c1733287a9b41
parent25b2e8203ae87b1f9c896bb9abf78dc53cb0b879 (diff)
downloadbcm5719-llvm-3f7fab913dba196cbb12ccabc61876c208887d49.tar.gz
bcm5719-llvm-3f7fab913dba196cbb12ccabc61876c208887d49.zip
Add testcase for prev. commit. Minor fixes
llvm-svn: 48686
-rw-r--r--llvm/lib/VMCore/Verifier.cpp4
-rw-r--r--llvm/test/Verifier/aliasing-chain.ll6
2 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp
index f6bc4b9db0d..4bcfb1a9dbb 100644
--- a/llvm/lib/VMCore/Verifier.cpp
+++ b/llvm/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/llvm/test/Verifier/aliasing-chain.ll b/llvm/test/Verifier/aliasing-chain.ll
new file mode 100644
index 00000000000..53b929bd782
--- /dev/null
+++ b/llvm/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
OpenPOWER on IntegriCloud