diff options
| author | Kazu Hirata <kazu@google.com> | 2025-05-20 06:47:18 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-20 06:47:18 -0700 |
| commit | 86f2fdd5e448abbe8d215e2f79a0c388bf7ca2ed (patch) | |
| tree | 9d58da9d7ed8fd7a9426425063780ff3c40dd56a /mlir/lib/TableGen/CodeGenHelpers.cpp | |
| parent | 822db013192e446bb7197a4cec82b8f02207cc41 (diff) | |
[TableGen] Tach getInputFilename to return StringRef (NFC) (#140690)
AFAICT, all callers of getInputFilename consume the string right away.
Nobody seems to rely on the "copy" behavior that comes with returning
"const std::string".
Diffstat (limited to 'mlir/lib/TableGen/CodeGenHelpers.cpp')
| -rw-r--r-- | mlir/lib/TableGen/CodeGenHelpers.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/TableGen/CodeGenHelpers.cpp b/mlir/lib/TableGen/CodeGenHelpers.cpp index 0a07071fea21..f4031be24dfd 100644 --- a/mlir/lib/TableGen/CodeGenHelpers.cpp +++ b/mlir/lib/TableGen/CodeGenHelpers.cpp @@ -27,7 +27,7 @@ using namespace mlir::tblgen; static std::string getUniqueOutputLabel(const RecordKeeper &records, StringRef tag) { // Use the input file name when generating a unique name. - std::string inputFilename = records.getInputFilename(); + StringRef inputFilename = records.getInputFilename(); // Drop all but the base filename. StringRef nameRef = sys::path::filename(inputFilename); |
