diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2024-12-13 23:58:48 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-13 23:58:48 -0800 |
commit | ca79ff07d8ae7a0c2531bfdb1cb623e25e5bd486 (patch) | |
tree | f6a13832bb6b9a8638a11ca82774dd43a62aab1d /clang/lib/Basic/Targets/AMDGPU.cpp | |
parent | 2291e5aa45dc135a5f908032eb31d19ef3570114 (diff) | |
download | llvm-ca79ff07d8ae7a0c2531bfdb1cb623e25e5bd486.zip llvm-ca79ff07d8ae7a0c2531bfdb1cb623e25e5bd486.tar.gz llvm-ca79ff07d8ae7a0c2531bfdb1cb623e25e5bd486.tar.bz2 |
Revert "Switch builtin strings to use string tables" (#119638)
Reverts llvm/llvm-project#118734
There are currently some specific versions of MSVC that are miscompiling
this code (we think). We don't know why as all the other build bots and
at least some folks' local Windows builds work fine.
This is a candidate revert to help the relevant folks catch their
builders up and have time to debug the issue. However, the expectation
is to roll forward at some point with a workaround if at all possible.
Diffstat (limited to 'clang/lib/Basic/Targets/AMDGPU.cpp')
-rw-r--r-- | clang/lib/Basic/Targets/AMDGPU.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/clang/lib/Basic/Targets/AMDGPU.cpp b/clang/lib/Basic/Targets/AMDGPU.cpp index 21281e7..99f8f29 100644 --- a/clang/lib/Basic/Targets/AMDGPU.cpp +++ b/clang/lib/Basic/Targets/AMDGPU.cpp @@ -88,18 +88,13 @@ const LangASMap AMDGPUTargetInfo::AMDGPUDefIsPrivMap = { } // namespace targets } // namespace clang -static constexpr int NumBuiltins = - clang::AMDGPU::LastTSBuiltin - Builtin::FirstTSBuiltin; - -static constexpr auto BuiltinStorage = Builtin::Storage<NumBuiltins>::Make( -#define BUILTIN CLANG_BUILTIN_STR_TABLE -#define TARGET_BUILTIN CLANG_TARGET_BUILTIN_STR_TABLE -#include "clang/Basic/BuiltinsAMDGPU.def" - , { -#define BUILTIN CLANG_BUILTIN_ENTRY -#define TARGET_BUILTIN CLANG_TARGET_BUILTIN_ENTRY +static constexpr Builtin::Info BuiltinInfo[] = { +#define BUILTIN(ID, TYPE, ATTRS) \ + {#ID, TYPE, ATTRS, nullptr, HeaderDesc::NO_HEADER, ALL_LANGUAGES}, +#define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) \ + {#ID, TYPE, ATTRS, FEATURE, HeaderDesc::NO_HEADER, ALL_LANGUAGES}, #include "clang/Basic/BuiltinsAMDGPU.def" - }); +}; const char *const AMDGPUTargetInfo::GCCRegNames[] = { "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", @@ -271,9 +266,9 @@ void AMDGPUTargetInfo::adjust(DiagnosticsEngine &Diags, LangOptions &Opts) { !isAMDGCN(getTriple())); } -std::pair<const char *, ArrayRef<Builtin::Info>> -AMDGPUTargetInfo::getTargetBuiltinStorage() const { - return {BuiltinStorage.StringTable, BuiltinStorage.Infos}; +ArrayRef<Builtin::Info> AMDGPUTargetInfo::getTargetBuiltins() const { + return llvm::ArrayRef(BuiltinInfo, + clang::AMDGPU::LastTSBuiltin - Builtin::FirstTSBuiltin); } void AMDGPUTargetInfo::getTargetDefines(const LangOptions &Opts, |