aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/Lint.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Analysis/Lint.cpp b/lib/Analysis/Lint.cpp
index a9d9724..5f1cb61 100644
--- a/lib/Analysis/Lint.cpp
+++ b/lib/Analysis/Lint.cpp
@@ -521,6 +521,12 @@ void Lint::visitIndirectBrInst(IndirectBrInst &I) {
Assert1(I.getNumDestinations() != 0,
"Undefined behavior: indirectbr with no destinations", &I);
+
+ for (unsigned i = 0, e = I.getNumDestinations(); i != e; ++i)
+ Assert1(I.getDestination(i)->hasAddressTaken(),
+ "Unusual: indirectbr destination has not "
+ "had its address taken",
+ &I);
}
void Lint::visitExtractElementInst(ExtractElementInst &I) {