diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2022-07-04 19:20:19 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2023-02-08 19:02:26 +0000 |
commit | 81ad626541db97eb356e2c1d4a20eb2a26a766ab (patch) | |
tree | 311b6a8987c32b1e1dcbab65c54cfac3fdb56175 /contrib/llvm-project/clang/lib/Testing/CommandLineArgs.cpp | |
parent | 5fff09660e06a66bed6482da9c70df328e16bbb6 (diff) | |
parent | 145449b1e420787bb99721a429341fa6be3adfb6 (diff) |
Diffstat (limited to 'contrib/llvm-project/clang/lib/Testing/CommandLineArgs.cpp')
-rw-r--r-- | contrib/llvm-project/clang/lib/Testing/CommandLineArgs.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/contrib/llvm-project/clang/lib/Testing/CommandLineArgs.cpp b/contrib/llvm-project/clang/lib/Testing/CommandLineArgs.cpp index cd4d8c188da9..bf517e2dd312 100644 --- a/contrib/llvm-project/clang/lib/Testing/CommandLineArgs.cpp +++ b/contrib/llvm-project/clang/lib/Testing/CommandLineArgs.cpp @@ -36,6 +36,9 @@ std::vector<std::string> getCommandLineArgsForTesting(TestLanguage Lang) { case Lang_CXX20: Args = {"-std=c++20", "-frtti"}; break; + case Lang_OBJC: + Args = {"-x", "objective-c", "-frtti", "-fobjc-nonfragile-abi"}; + break; case Lang_OBJCXX: Args = {"-x", "objective-c++", "-frtti"}; break; @@ -45,6 +48,42 @@ std::vector<std::string> getCommandLineArgsForTesting(TestLanguage Lang) { return Args; } +std::vector<std::string> getCC1ArgsForTesting(TestLanguage Lang) { + std::vector<std::string> Args; + switch (Lang) { + case Lang_C89: + Args = {"-xc", "-std=c89"}; + break; + case Lang_C99: + Args = {"-xc", "-std=c99"}; + break; + case Lang_CXX03: + Args = {"-std=c++03"}; + break; + case Lang_CXX11: + Args = {"-std=c++11"}; + break; + case Lang_CXX14: + Args = {"-std=c++14"}; + break; + case Lang_CXX17: + Args = {"-std=c++17"}; + break; + case Lang_CXX20: + Args = {"-std=c++20"}; + break; + case Lang_OBJC: + Args = {"-xobjective-c"}; + break; + case Lang_OBJCXX: + Args = {"-xobjective-c++"}; + break; + case Lang_OpenCL: + llvm_unreachable("Not implemented yet!"); + } + return Args; +} + StringRef getFilenameForTesting(TestLanguage Lang) { switch (Lang) { case Lang_C89: @@ -61,6 +100,9 @@ StringRef getFilenameForTesting(TestLanguage Lang) { case Lang_OpenCL: return "input.cl"; + case Lang_OBJC: + return "input.m"; + case Lang_OBJCXX: return "input.mm"; } |