diff options
author | Dan Gohman <gohman@apple.com> | 2010-08-16 14:39:19 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-08-16 14:39:19 +0000 |
commit | 9883b95a2bff097ec6d0f34af1ddea22bf29b6c6 (patch) | |
tree | c239e752e119a81a7c4e40e27d24fa2b479bc0c9 | |
parent | bde87c4d2a98ef2d406bd596cd1e5455a5573312 (diff) | |
download | external_llvm-9883b95a2bff097ec6d0f34af1ddea22bf29b6c6.zip external_llvm-9883b95a2bff097ec6d0f34af1ddea22bf29b6c6.tar.gz external_llvm-9883b95a2bff097ec6d0f34af1ddea22bf29b6c6.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111121 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Analysis/Lint.cpp | 6 | ||||
-rw-r--r-- | test/Other/lint.ll | 1 |
2 files changed, 0 insertions, 7 deletions
diff --git a/lib/Analysis/Lint.cpp b/lib/Analysis/Lint.cpp index 5f1cb61..a9d9724 100644 --- a/lib/Analysis/Lint.cpp +++ b/lib/Analysis/Lint.cpp @@ -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) { diff --git a/test/Other/lint.ll b/test/Other/lint.ll index 2163a42..fcef7ee 100644 --- a/test/Other/lint.ll +++ b/test/Other/lint.ll @@ -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: |