[flang] Fixed unittest build issue with older gcc.
authorSlava Zakharin <szakharin@nvidia.com>
Thu, 19 Jan 2023 02:10:09 +0000 (18:10 -0800)
committerSlava Zakharin <szakharin@nvidia.com>
Thu, 19 Jan 2023 03:20:57 +0000 (19:20 -0800)
I am getting this error with `check-flang`:
```
ld.lld: error: undefined symbol: mlir::SuccessorRange::SuccessorRange(mlir::Operation*)
>>> referenced by Operation.h:549 (/llvm-project/llvm/../mlir/include/mlir/IR/Operation.h:549)
>>>               CMakeFiles/FlangRuntimeTests.dir/Allocatable.cpp.o:(mlir::Operation::getSuccessors())
```

The buildbots are okay, so I guess it has something to do with
gcc-9 that I am using.

Differential Revision: https://reviews.llvm.org/D142069

flang/unittests/Runtime/Allocatable.cpp

index bba501e..919279a 100644 (file)
@@ -9,13 +9,6 @@
 #include "flang/Runtime/allocatable.h"
 #include "gtest/gtest.h"
 #include "tools.h"
-#include "flang/Common/Fortran.h"
-#include "flang/ISO_Fortran_binding.h"
-#include "flang/Optimizer/Builder/FIRBuilder.h"
-#include "flang/Optimizer/Support/InitFIR.h"
-#include "flang/Optimizer/Support/KindMapping.h"
-#include "flang/Runtime/descriptor.h"
-#include "flang/Runtime/memory.h"
 
 using namespace Fortran::runtime;