aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorwren romano <2998727+wrengr@users.noreply.github.com>2023-08-22 20:02:19 -0700
committerAart Bik <ajcbik@google.com>2023-08-22 20:31:15 -0700
commitf5b974b7835a27de7c5d6142e935f2f95da997a3 (patch)
tree88e3df3835f041278b2f9bdc68724e1759860993 /flang/lib/Frontend/CompilerInvocation.cpp
parent78921a64f74facb4a2aa1552a89d2e7c579884d1 (diff)
downloadllvm-f5b974b7835a27de7c5d6142e935f2f95da997a3.zip
llvm-f5b974b7835a27de7c5d6142e935f2f95da997a3.tar.gz
llvm-f5b974b7835a27de7c5d6142e935f2f95da997a3.tar.bz2
[mlir][sparse] Adding `{Var,DimLvlExpr,DimSpec,LvlSpec,DimLvlMap}::str` methods
These methods are needed for use with `Diagnostic::operator<<` etc. The definitions follow the pattern of `Diagnostic::str` by simply wrapping the underlying `print(raw_ostream)` method. Although there is some overhead for constructing the `std::string`, this seems like the overall most-efficient option: since this overhead only occurs on the error path (under the current intended usage). An alternative approach would be to have one method construct a `Twine` directly, and then have the print method pass the twine to the stream; however, that would mean introducing the overhead of twine construction on the common/happy path of simply printing things out. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D157643
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions