For the generated builder taking in unwrapped attribute values,
if the argument is a string, we should avoid wrapping it in quotes;
otherwise we are always setting the string attribute to contain
the string argument's name. The quotes come from StrinAttr's
constBuilderCall, which is reasonable for string literals, but
not function arguments containing strings.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Unit tests: pass. 61989 tests passed, 0 failed and 783 were skipped.
clang-tidy: unknown.
clang-format: pass.
Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
Unit tests: pass. 61989 tests passed, 0 failed and 783 were skipped.
clang-tidy: unknown.
clang-format: pass.
Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp | ||
---|---|---|
98 | Why not just add a replaceAllSubStrs using std::string instead? Generally only takes ~5 lines of code. |
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp | ||
---|---|---|
98 | Sure, that works too. Changed. |
Unit tests: pass. 61989 tests passed, 0 failed and 783 were skipped.
clang-tidy: unknown.
clang-format: pass.
Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp | ||
---|---|---|
1002 | Remove trivial brace. |
Why not just add a replaceAllSubStrs using std::string instead? Generally only takes ~5 lines of code.