This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix build errors for clang-10
ClosedPublic

Authored by awarzynski on Oct 2 2020, 1:56 AM.

Details

Summary

Two NFCs that fix building with Clang-10. These are only wornings, but
since Flang sets -Werror, we need to get rid of this. As per
flang/README.md, Clang-10 is one of the officially supported compilers.

Diff Detail

Event Timeline

awarzynski created this revision.Oct 2 2020, 1:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 2 2020, 1:56 AM
awarzynski requested review of this revision.Oct 2 2020, 1:56 AM

For reference:
@clementval: https://reviews.llvm.org/D87389

/home/flang/temp/llvm-project/flang/lib/Lower/OpenACC.cpp:102:32: error: unused variable 'argTy' [-Werror,-Wunused-variable]
    llvm::ArrayRef<mlir::Type> argTy;
                               ^
1 error generated.

@klausler https://reviews.llvm.org/D88672

/home/flang/temp/llvm-project/flang/runtime/io-stmt.h:165:1: error: 'ListDirectedStatementState' defined as a class template here but previously declared as a struct template; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags]
class ListDirectedStatementState<Direction::Input>
^
/home/flang/temp/llvm-project/flang/runtime/io-stmt.h:152:22: note: did you mean class here?
template <Direction> struct ListDirectedStatementState;
                     ^~~~~~
                     class
1 error generated.

Failing buildbot (stil staging, so no notifications are sent): http://lab.llvm.org:8014/#/builders/26

I'm not familiar with this code base, so suggestions are welcome.

tskeith added a project: Restricted Project.Oct 2 2020, 6:50 AM
tskeith accepted this revision.Oct 2 2020, 6:50 AM
This revision is now accepted and ready to land.Oct 2 2020, 6:50 AM

FYI, the io-stmt.h warning is fixed in https://reviews.llvm.org/D88711 (with them all declared as class). The other change is still needed.

@tskeith Thank you for the heads up. Updated accordingly and merged!

This revision was automatically updated to reflect the committed changes.

Thanks for fixing this.