LangOptions::SYCLVersion can only have two values. This patch introduces an enum that allows us to reduce the member size from 32 bits to 1 bit.
Consequently, this also makes marshalling of this option fit into our model for enums: D84674.
Paths
| Differential D93540
[clang] Use enum for LangOptions::SYCLVersion instead of unsigned ClosedPublic Authored by jansvoboda11 on Dec 18 2020, 6:40 AM.
Details Summary LangOptions::SYCLVersion can only have two values. This patch introduces an enum that allows us to reduce the member size from 32 bits to 1 bit. Consequently, this also makes marshalling of this option fit into our model for enums: D84674.
Diff Detail
Event TimelineComment Actions I've reviewed the code and it seems to do the right thing. I'd like a SYCL maintainer to take a look too though. (If for some reason changing the interface to an enum isn't desirable, maybe there's a compromise where there's an accessor that converts back to an integer?) Comment Actions LGTM. Thanks! @erichkeane, @mdtoguchi, we should upstream support for SYCL-2020 version in addition to SYCL-2017. This revision is now accepted and ready to land.Dec 19 2020, 7:23 AM Closed by commit rG5a85526728c9: [clang] Use enum for LangOptions::SYCLVersion instead of unsigned (authored by jansvoboda11). · Explain WhyDec 21 2020, 2:33 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 313054 clang/include/clang/Basic/LangOptions.h
clang/include/clang/Basic/LangOptions.def
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Frontend/InitPreprocessor.cpp
|