Skip to content

Commit 0586067

Browse files
committed
[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. ```
1 parent c3a9e69 commit 0586067

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

flang/lib/Semantics/canonicalize-omp.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "canonicalize-omp.h"
1010
#include "flang/Parser/parse-tree-visitor.h"
1111
#include "flang/Parser/parse-tree.h"
12+
#include "flang/Semantics/semantics.h"
1213

1314
// After Loop Canonicalization, rewrite OpenMP parse tree to make OpenMP
1415
// Constructs more structured which provide explicit scopes for later

0 commit comments

Comments
 (0)