aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Verifier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/Verifier.cpp')
-rw-r--r--lib/VMCore/Verifier.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp
index 6126253..f6bc4b9 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);
}