diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-01-06 21:34:26 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-01-06 21:34:26 +0000 |
| commit | d215fd3b74b90f5dc1964610926fcc2a20f959aa (patch) | |
| tree | 0c9f21e40eae033d6760008729f37d2103e2c654 /unittests/IR/BasicBlockTest.cpp | |
| parent | b8a2042aa938069e862750553db0e4d82d25822c (diff) | |
Vendor import of llvm release_60 branch r321788:vendor/llvm/llvm-release_60-r321788
Notes
svn path=/vendor/llvm/dist-release_60/; revision=327639
svn path=/vendor/llvm/llvm-release_60-r321788/; revision=327640; tag=vendor/llvm/llvm-release_60-r321788
Diffstat (limited to 'unittests/IR/BasicBlockTest.cpp')
| -rw-r--r-- | unittests/IR/BasicBlockTest.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/unittests/IR/BasicBlockTest.cpp b/unittests/IR/BasicBlockTest.cpp index f1777e35b82c..08a41ff36938 100644 --- a/unittests/IR/BasicBlockTest.cpp +++ b/unittests/IR/BasicBlockTest.cpp @@ -33,6 +33,12 @@ TEST(BasicBlockTest, PhiRange) { std::unique_ptr<BasicBlock> BB2(BasicBlock::Create(Context)); BranchInst::Create(BB.get(), BB2.get()); + // Make sure this doesn't crash if there are no phis. + for (auto &PN : BB->phis()) { + (void)PN; + EXPECT_TRUE(false) << "empty block should have no phis"; + } + // Make it a cycle. auto *BI = BranchInst::Create(BB.get(), BB.get()); |
