[flang-commits] [PATCH] D95180: [flang][nfc] Fix comments, remove needless API, tweak script

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Jan 22 10:23:37 PST 2021


klausler updated this revision to Diff 318570.
klausler added a reviewer: tskeith.
klausler added a comment.

Address review comment.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95180/new/

https://reviews.llvm.org/D95180

Files:
  flang/include/flang/Parser/provenance.h
  flang/include/flang/Semantics/symbol.h
  flang/lib/Semantics/assignment.cpp
  flang/tools/f18/flang


Index: flang/tools/f18/flang
===================================================================
--- flang/tools/f18/flang
+++ flang/tools/f18/flang
@@ -12,4 +12,9 @@
 if [[ ! -d $module_dir ]]; then
   module_dir=$wd/tools/flang/include/flang
 fi
-$wd/bin/f18 -module-suffix .f18.mod -intrinsic-module-directory $module_dir "$@"
+opts="-module-suffix .f18.mod -intrinsic-module-directory $module_dir"
+if ! $wd/bin/f18 $opts "$@"
+then status=$?
+     echo flang: in $PWD, f18 failed with exit status $status: $wd/bin/f18 $opts "$@" >&2
+     exit $status
+fi
Index: flang/lib/Semantics/assignment.cpp
===================================================================
--- flang/lib/Semantics/assignment.cpp
+++ flang/lib/Semantics/assignment.cpp
@@ -70,7 +70,7 @@
       const Scope &scope{context_.FindScope(lhsLoc)};
       if (auto whyNot{WhyNotModifiable(lhsLoc, lhs, scope, true)}) {
         if (auto *msg{Say(lhsLoc,
-                "Left-hand side of assignment is not modifiable"_err_en_US)}) { // C1158
+                "Left-hand side of assignment is not modifiable"_err_en_US)}) {
           msg->Attach(*whyNot);
         }
       }
Index: flang/include/flang/Semantics/symbol.h
===================================================================
--- flang/include/flang/Semantics/symbol.h
+++ flang/include/flang/Semantics/symbol.h
@@ -356,7 +356,7 @@
 };
 
 // Record the USE of a symbol: location is where (USE statement or renaming);
-// symbol is the USEd module.
+// symbol is in the USEd module.
 class UseDetails {
 public:
   UseDetails(const SourceName &location, const Symbol &symbol)
Index: flang/include/flang/Parser/provenance.h
===================================================================
--- flang/include/flang/Parser/provenance.h
+++ flang/include/flang/Parser/provenance.h
@@ -173,7 +173,6 @@
   std::string GetPath(Provenance) const; // __FILE__
   int GetLineNumber(Provenance) const; // __LINE__
   Provenance CompilerInsertionProvenance(char ch);
-  Provenance CompilerInsertionProvenance(const char *, std::size_t);
   ProvenanceRange IntersectionWithSourceFiles(ProvenanceRange) const;
   llvm::raw_ostream &Dump(llvm::raw_ostream &) const;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95180.318570.patch
Type: text/x-patch
Size: 2193 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210122/47671981/attachment.bin>


More information about the flang-commits mailing list