[flang] Module file improvements
authorTim Keith <tkeith@nvidia.com>
Wed, 8 Aug 2018 18:36:24 +0000 (11:36 -0700)
committerTim Keith <tkeith@nvidia.com>
Wed, 8 Aug 2018 18:36:24 +0000 (11:36 -0700)
commit3d43ea663bbdf7a5bf1c8676006ed6ef2f316296
tree13f43f29c514eb0776642561ee6f2c856afcb34e
parent70dfdf979d231c44bb1a9c732b387537e9cde877
[flang] Module file improvements

Verify that checksums are correct when reading a module file.

Don't write a module file if its current contents are correct.

Don't make .mod files read-only. It doesn't do much to prevent
users from editing them, checksum verification will detect when
it happens, and having them read-only causes problems if you then
compile with another compiler (e.g. PGI).

Original-commit: flang-compiler/f18@21d82aef6e8836f4cc0736d4eb2b59abdfa6fbc0
Reviewed-on: https://github.com/flang-compiler/f18/pull/164
Tree-same-pre-rewrite: false
flang/lib/semantics/mod-file.cc
flang/lib/semantics/mod-file.h