10#include "llvm/MC/TargetRegistry.h"
11#include "llvm/Support/ErrorHandling.h"
16 std::vector<std::string> Args;
20 Args = {
"-x",
"c",
"-std=c89"};
23 Args = {
"-x",
"c",
"-std=c99"};
26 Args = {
"-std=c++03",
"-frtti"};
29 Args = {
"-std=c++11",
"-frtti"};
32 Args = {
"-std=c++14",
"-frtti"};
35 Args = {
"-std=c++17",
"-frtti"};
38 Args = {
"-std=c++20",
"-frtti"};
41 Args = {
"-std=c++23",
"-frtti"};
44 Args = {
"-x",
"objective-c",
"-frtti",
"-fobjc-nonfragile-abi"};
47 Args = {
"-x",
"objective-c++",
"-frtti"};
50 llvm_unreachable(
"Not implemented yet!");
56 std::vector<std::string> Args;
59 Args = {
"-xc",
"-std=c89"};
62 Args = {
"-xc",
"-std=c99"};
65 Args = {
"-std=c++03"};
68 Args = {
"-std=c++11"};
71 Args = {
"-std=c++14"};
74 Args = {
"-std=c++17"};
77 Args = {
"-std=c++20"};
80 Args = {
"-std=c++23"};
83 Args = {
"-xobjective-c"};
86 Args = {
"-xobjective-c++"};
89 llvm_unreachable(
"Not implemented yet!");
117 llvm_unreachable(
"Unhandled TestLanguage enum");
121 for (
const auto &
Target : llvm::TargetRegistry::targets()) {
123 StringRef TargetName(
Target.getName());
124 if (TargetName ==
"x86-64")
125 TargetName =
"x86_64";
126 if (llvm::TargetRegistry::lookupTarget(std::string(TargetName), Error) ==
128 return std::string(TargetName);
llvm::MachO::Target Target
The JSON file list parser is used to communicate input to InstallAPI.
std::string getAnyTargetForTesting()
Find a target name such that looking for it in TargetRegistry by that name returns the same target.
std::vector< std::string > getCC1ArgsForTesting(TestLanguage Lang)
StringRef getFilenameForTesting(TestLanguage Lang)
std::vector< std::string > getCommandLineArgsForTesting(TestLanguage Lang)