llvm/unittests/VMCore/InstructionsTest.cpp
Gabor Greif 138acfe353 fix PR6589
adjusted unittest

I have added some doxygen to OptionalOperandTraits,
so hopefully there will be no confusion in the future.

Incidentally OptionalOperandTraits is not used any more (IIUC),
but the obvious client would be BranchInstr, and I plan
to rearrange it that way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98624 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 10:59:48 +00:00

27 lines
705 B
C++

//===- llvm/unittest/VMCore/InstructionsTest.cpp - Instructions unit tests ===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "llvm/Instructions.h"
#include "llvm/LLVMContext.h"
#include "gtest/gtest.h"
namespace llvm {
namespace {
TEST(InstructionsTest, ReturnInst) {
LLVMContext &C(getGlobalContext());
// test for PR6589
const ReturnInst* r0 = ReturnInst::Create(C);
EXPECT_EQ(r0->op_begin(), r0->op_end());
}
} // end anonymous namespace
} // end namespace llvm