mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 05:32:28 +08:00
[flang] Support <name>=<integer> syntax in compiler directives
Accept name=value as part of a !DIR$ compiler directive. These are currently ignored in semantics, but we should recognize more directive forms to facilitate testing. In due course, these placeholding directive parsers will be replaced. Reviewed By: sscalpone Differential Revision: https://reviews.llvm.org/D84077
This commit is contained in:
@@ -1761,7 +1761,9 @@ public:
|
||||
Word("!DIR$ IGNORE_TKR"); // emitted even if tkr list is empty
|
||||
Walk(" ", tkr, ", ");
|
||||
},
|
||||
[&](const std::list<Name> &names) { Walk("!DIR$ ", names, " "); },
|
||||
[&](const std::list<CompilerDirective::NameValue> &names) {
|
||||
Walk("!DIR$ ", names, " ");
|
||||
},
|
||||
},
|
||||
x.u);
|
||||
Put('\n');
|
||||
@@ -1777,6 +1779,10 @@ public:
|
||||
}
|
||||
Walk(std::get<Name>(x.t));
|
||||
}
|
||||
void Unparse(const CompilerDirective::NameValue &x) {
|
||||
Walk(std::get<Name>(x.t));
|
||||
Walk("=", std::get<std::optional<std::uint64_t>>(x.t));
|
||||
}
|
||||
|
||||
// OpenACC Directives & Clauses
|
||||
void Unparse(const AccAtomicCapture &x) {
|
||||
|
||||
Reference in New Issue
Block a user