[llvm-commits] [llvm] r111121 - in /llvm/trunk: lib/Analysis/Lint.cpp test/Other/lint.ll
Dan Gohman
gohman at apple.com
Mon Aug 16 07:39:20 PDT 2010
Author: djg
Date: Mon Aug 16 09:39:19 2010
New Revision: 111121
URL: http://llvm.org/viewvc/llvm-project?rev=111121&view=rev
Log:
Revert r111058, the lint check for indirectbr successors that aren't
address-taken. This can occur normally, if the code which took the
address got DCEd.
Modified:
llvm/trunk/lib/Analysis/Lint.cpp
llvm/trunk/test/Other/lint.ll
Modified: llvm/trunk/lib/Analysis/Lint.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/Lint.cpp?rev=111121&r1=111120&r2=111121&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/Lint.cpp (original)
+++ llvm/trunk/lib/Analysis/Lint.cpp Mon Aug 16 09:39:19 2010
@@ -521,12 +521,6 @@
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) {
Modified: llvm/trunk/test/Other/lint.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/lint.ll?rev=111121&r1=111120&r2=111121&view=diff
==============================================================================
--- llvm/trunk/test/Other/lint.ll (original)
+++ llvm/trunk/test/Other/lint.ll Mon Aug 16 09:39:19 2010
@@ -102,7 +102,6 @@
}
; CHECK: Undefined behavior: Branch to non-blockaddress
-; CHECK: Unusual: indirectbr destination has not had its address taken
define void @use_indbr() {
indirectbr i8* bitcast (i32()* @foo to i8*), [label %block]
block:
More information about the llvm-commits
mailing list