Revert r111058, the lint check for indirectbr successors that aren't
authorDan Gohman <gohman@apple.com>
Mon, 16 Aug 2010 14:39:19 +0000 (14:39 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 16 Aug 2010 14:39:19 +0000 (14:39 +0000)
address-taken. This can occur normally, if the code which took the
address got DCEd.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111121 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/Lint.cpp
test/Other/lint.ll

index 5f1cb61dacb80e647d9e864e74083ea8637e7cb6..a9d972435f5fb8bbcea035b8d3d586f3283127fa 100644 (file)
@@ -521,12 +521,6 @@ 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) {
index 2163a42eb02496376642480f2668b2fd11702eeb..fcef7ee2d57133779ee1f2134fc8265ed5bf6f2e 100644 (file)
@@ -102,7 +102,6 @@ define void @not_vararg(i8* %p) nounwind {
 }
 
 ; 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: