[PATCH] D93344: [flang] Handle multiple names for same operator
Peter Klausler via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 15 15:49:21 PST 2020
klausler accepted this revision.
klausler added a comment.
This revision is now accepted and ready to land.
Could the same effect be accomplished by instead canonicalizing `operator(...)` names in the output of the prescanner?
================
Comment at: flang/lib/Semantics/resolve-names-utils.cpp:32
+static const std::string operatorPrefix{"operator("};
+
----------------
This might be an instance of a static variable with a nontrivial constructor, which is typically verboten in LLVM. Can you make it `constexpr` instead?
================
Comment at: flang/lib/Semantics/resolve-names-utils.cpp:167
+llvm::raw_ostream &operator<<(
+ llvm::raw_ostream &os, const GenericSpecInfo &info) {
----------------
Is this code just for debugging during development?
================
Comment at: flang/lib/Semantics/resolve-names.cpp:505
Symbol *FindInScope(const Scope &, const SourceName &);
+ template <typename T> Symbol *FindInScope(const T &name) {
+ return FindInScope(currScope(), name);
----------------
This template seems to just call one of the two overloads declared beforehand, and may not be necessary.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93344/new/
https://reviews.llvm.org/D93344
More information about the llvm-commits
mailing list