aboutsummaryrefslogtreecommitdiff
path: root/flang/lib
diff options
context:
space:
mode:
authorMichael Kruse <llvm-project@meinersbur.de>2025-07-23 10:18:13 +0200
committerMichael Kruse <llvm-project@meinersbur.de>2025-07-23 10:22:10 +0200
commit0586067cf07bef0f04fd1dc7135a9b773ebaa07a (patch)
treed00968a55c6d16c9ad7fe9dacdb39f8b84958ec4 /flang/lib
parentc3a9e69737c0577cacddff1a2b4cfd2209fb3706 (diff)
downloadllvm-0586067cf07bef0f04fd1dc7135a9b773ebaa07a.zip
llvm-0586067cf07bef0f04fd1dc7135a9b773ebaa07a.tar.gz
llvm-0586067cf07bef0f04fd1dc7135a9b773ebaa07a.tar.bz2
[Flang] Build fix without precompiled headers
The header semantics.h is added implitly in the precompiled headers, but the build was failing when precompiled headers are disabled (e.g. using CMAKE_DISABLE_PRECOMPILE_HEADERS=ON): ``` ../_src/flang/lib/Semantics/canonicalize-omp.cpp: In constructor ‘Fortran::semantics::CanonicalizationOfOmp::CanonicalizationOfOmp(Fortran::semantics::SemanticsContext&)’: ../_src/flang/lib/Semantics/canonicalize-omp.cpp:31:38: error: invalid use of incomplete type ‘class Fortran::semantics::SemanticsContext’ 31 | : context_{context}, messages_{context.messages()} {} | ^~~~~~~ In file included from ../_src/flang/lib/Semantics/canonicalize-omp.cpp:9: ../_src/flang/lib/Semantics/canonicalize-omp.h:17:7: note: forward declaration of ‘class Fortran::semantics::SemanticsContext’ 17 | class SemanticsContext; | ^~~~~~~~~~~~~~~~ compilation terminated due to -fmax-errors=1. ```
Diffstat (limited to 'flang/lib')
-rw-r--r--flang/lib/Semantics/canonicalize-omp.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/flang/lib/Semantics/canonicalize-omp.cpp b/flang/lib/Semantics/canonicalize-omp.cpp
index 77e2fd6..9722eca 100644
--- a/flang/lib/Semantics/canonicalize-omp.cpp
+++ b/flang/lib/Semantics/canonicalize-omp.cpp
@@ -9,6 +9,7 @@
#include "canonicalize-omp.h"
#include "flang/Parser/parse-tree-visitor.h"
#include "flang/Parser/parse-tree.h"
+#include "flang/Semantics/semantics.h"
// After Loop Canonicalization, rewrite OpenMP parse tree to make OpenMP
// Constructs more structured which provide explicit scopes for later