#include "llvm/TargetParser/CSKYTargetParser.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/CSKYAttributes.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/TargetParser/TargetParser.h"
#include "gtest/gtest.h"
#include <string>
usingnamespacellvm;
namespace {
std::string FormatExtensionFlags(uint64_t Flags) { … }
testing::AssertionResult AssertSameExtensionFlags(const char *m_expr,
const char *n_expr,
uint64_t ExpectedFlags,
uint64_t GotFlags) { … }
struct CSKYCPUTestParams { … };
class CSKYCPUTestFixture : public ::testing::TestWithParam<CSKYCPUTestParams> { … };
TEST_P(CSKYCPUTestFixture, CSKYCPUTests) { … }
INSTANTIATE_TEST_SUITE_P(…);
static constexpr unsigned NumCSKYCPUArchs = …;
TEST(TargetParserTest, testCSKYCPUArchList) { … }
TEST(TargetParserTest, testInvalidCSKYArch) { … }
bool testCSKYArch(StringRef Arch, StringRef DefaultCPU) { … }
TEST(TargetParserTest, testCSKYArch) { … }
TEST(TargetParserTest, CSKYFPUVersion) { … }
TEST(TargetParserTest, CSKYExtensionFeatures) { … }
TEST(TargetParserTest, CSKYFPUFeatures) { … }
TEST(TargetParserTest, CSKYArchExtFeature) { … }
}