[flang-commits] [flang] [flang][OpenMP] Implement OmpDirectiveName, use in OmpDirectiveSpecif… (PR #130121)

Mats Petersson via flang-commits flang-commits at lists.llvm.org
Thu Mar 6 09:16:26 PST 2025


================
@@ -253,6 +253,21 @@ llvm::raw_ostream &operator<<(llvm::raw_ostream &os, const Name &x) {
   return os << x.ToString();
 }
 
+OmpDirectiveName::OmpDirectiveName(const Verbatim &name) {
+  std::string_view nameView{name.source.begin(), name.source.size()};
+  std::string nameLower{ToLowerCaseLetters(nameView)};
+  // If the name was actually "unknown" then accept it, otherwise flag
----------------
Leporacanthicus wrote:

Ah, simpler code with much clearer comment = good thing! :)

https://github.com/llvm/llvm-project/pull/130121


More information about the flang-commits mailing list