diff options
| author | Nick Sarnie <nick.sarnie@intel.com> | 2025-03-28 10:19:20 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-28 14:19:20 +0000 |
| commit | 48b753027382a5815295d6680c7dd407be936c86 (patch) | |
| tree | f5a9d6ab54ccceeb39de839a6280bb50ba89df42 /clang/lib/Frontend/InitPreprocessor.cpp | |
| parent | 427725508b084c7aa595312967d74d8888b168b6 (diff) | |
[clang][flang][Triple][llvm] Add isOffload function to LangOpts and isGPU function to Triple (#126956)
I'm adding support for SPIR-V, so let's consolidate these checks.
---------
Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
| -rw-r--r-- | clang/lib/Frontend/InitPreprocessor.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index 0b54665501c7..90d0f5c8c9d1 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -1568,9 +1568,7 @@ void clang::InitializePreprocessor(Preprocessor &PP, if (InitOpts.UsePredefines) { // FIXME: This will create multiple definitions for most of the predefined // macros. This is not the right way to handle this. - if ((LangOpts.CUDA || LangOpts.OpenMPIsTargetDevice || - LangOpts.SYCLIsDevice) && - PP.getAuxTargetInfo()) + if ((LangOpts.CUDA || LangOpts.isTargetDevice()) && PP.getAuxTargetInfo()) InitializePredefinedMacros(*PP.getAuxTargetInfo(), LangOpts, FEOpts, PP.getPreprocessorOpts(), Builder); |
