2010-03-16 09:55:46 +00:00
|
|
|
//===- 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 {
|
|
|
|
|
2010-03-16 10:59:48 +00:00
|
|
|
TEST(InstructionsTest, ReturnInst) {
|
2010-03-16 09:55:46 +00:00
|
|
|
LLVMContext &C(getGlobalContext());
|
|
|
|
|
2010-03-16 10:59:48 +00:00
|
|
|
// test for PR6589
|
2010-03-16 09:55:46 +00:00
|
|
|
const ReturnInst* r0 = ReturnInst::Create(C);
|
2010-03-16 10:59:48 +00:00
|
|
|
EXPECT_EQ(r0->op_begin(), r0->op_end());
|
2010-03-16 09:55:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
} // end anonymous namespace
|
|
|
|
} // end namespace llvm
|