mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-26 13:26:22 +00:00
[libc++][test] Removes old fallbacks.
All supported compilers support the -std=year except Clang < 17 which doesn't support C++23. This fallback is marked for removal once we no longer support Clang 16. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D152106
This commit is contained in:
parent
09addf9cbe
commit
202054559c
@ -57,18 +57,15 @@ _allStandards = ["c++03", "c++11", "c++14", "c++17", "c++20", "c++23", "c++26"]
|
||||
|
||||
|
||||
def getStdFlag(cfg, std):
|
||||
fallbacks = {
|
||||
"c++11": "c++0x",
|
||||
"c++14": "c++1y",
|
||||
"c++17": "c++1z",
|
||||
"c++20": "c++2a",
|
||||
"c++23": "c++2b",
|
||||
}
|
||||
# TODO(LLVM-17) Remove this clang-tidy-16 work-around
|
||||
if std == "c++23":
|
||||
std = "c++2b"
|
||||
if hasCompileFlag(cfg, "-std=" + std):
|
||||
return "-std=" + std
|
||||
# TODO(LLVM-19) Remove the fallbacks needed for Clang 16.
|
||||
fallbacks = {
|
||||
"c++23": "c++2b",
|
||||
}
|
||||
if std in fallbacks and hasCompileFlag(cfg, "-std=" + fallbacks[std]):
|
||||
return "-std=" + fallbacks[std]
|
||||
return None
|
||||
|
Loading…
x
Reference in New Issue
Block a user