[clang] [Clang][TableGen] Use StringRef in FlattenedSpelling (PR #113809)

2024-10-28 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM; I think this is relying on reasonably safe assumptions -- at least, I couldn't find any places where we were pushing data into the flattened spelling and it wasn't longer-lived than the `FlattenedSpelling` object itself. https:/

[clang] [Clang][TableGen] Use StringRef in FlattenedSpelling (PR #113809)

2024-10-28 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/113809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Use StringRef in FlattenedSpelling (PR #113809)

2024-10-28 Thread Rahul Joshi via cfe-commits
@@ -49,40 +49,38 @@ using namespace llvm; namespace { class FlattenedSpelling { - std::string V, N, NS; + StringRef V, N, NS; jurahul wrote: In short, I'll defer it to you. If we don't want to commit this, I am fine and the find the reasoning behind if rea

[clang] [Clang][TableGen] Use StringRef in FlattenedSpelling (PR #113809)

2024-10-28 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/113809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Use StringRef in FlattenedSpelling (PR #113809)

2024-10-28 Thread Rahul Joshi via cfe-commits
@@ -49,40 +49,38 @@ using namespace llvm; namespace { class FlattenedSpelling { - std::string V, N, NS; + StringRef V, N, NS; jurahul wrote: > TG is not perf critical I have seen bugs about Tg perf, but may be not this particular backend, https://github.

[clang] [Clang][TableGen] Use StringRef in FlattenedSpelling (PR #113809)

2024-10-28 Thread Rahul Joshi via cfe-commits
@@ -49,40 +49,38 @@ using namespace llvm; namespace { class FlattenedSpelling { - std::string V, N, NS; + StringRef V, N, NS; jurahul wrote: In all these instances, the strings are derived from TableGen Records, so they do outlive. I do agree that TG is no

[clang] [Clang][TableGen] Use StringRef in FlattenedSpelling (PR #113809)

2024-10-28 Thread Aaron Ballman via cfe-commits
@@ -49,40 +49,38 @@ using namespace llvm; namespace { class FlattenedSpelling { - std::string V, N, NS; + StringRef V, N, NS; AaronBallman wrote: I'm not keen on this change; it may be correct, but it's pretty dangerous too because this now requires `Flatt

[clang] [Clang][TableGen] Use StringRef in FlattenedSpelling (PR #113809)

2024-10-28 Thread Aaron Ballman via cfe-commits
@@ -49,40 +49,38 @@ using namespace llvm; namespace { class FlattenedSpelling { - std::string V, N, NS; + StringRef V, N, NS; bool K = false; const Record &OriginalSpelling; public: - FlattenedSpelling(const std::string &Variety, const std::string &Name, -

[clang] [Clang][TableGen] Use StringRef in FlattenedSpelling (PR #113809)

2024-10-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rahul Joshi (jurahul) Changes Change FlattenedSpelling to use StringRef instead of std::String. --- Patch is 24.42 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/113809.diff 1 Files Affected:

[clang] [Clang][TableGen] Use StringRef in FlattenedSpelling (PR #113809)

2024-10-27 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/113809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Use StringRef in FlattenedSpelling (PR #113809)

2024-10-27 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/113809 >From 6b128746e5f6bfa13e0ea9a900f0bc8529437717 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Sun, 27 Oct 2024 06:51:55 -0700 Subject: [PATCH] [Clang][TableGen] Use StringRef in FlattenedSpelling Change Flatt

[clang] [Clang][TableGen] Use StringRef in FlattenedSpelling (PR #113809)

2024-10-27 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/113809 >From 60da18c88e63612c791ccbb423d752bac311650b Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Sun, 27 Oct 2024 06:51:55 -0700 Subject: [PATCH] [Clang][TableGen] Use StringRef in FlattenedSpelling Change Flatt

[clang] [Clang][TableGen] Use StringRef in FlattenedSpelling (PR #113809)

2024-10-27 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/113809 >From 5fd76fe7a8fe6a009966cf0d7d67a53b68b601a1 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Sun, 27 Oct 2024 06:51:55 -0700 Subject: [PATCH] [Clang][TableGen] Use StringRef in FlattenedSpelling Change Flatt

[clang] [Clang][TableGen] Use StringRef in FlattenedSpelling (PR #113809)

2024-10-27 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/113809 Change FlattenedSpelling to use StringRef instead of std::String. >From 4a2e738c6b49ee7433cd9fa039b4028e862d92fe Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Sun, 27 Oct 2024 06:51:55 -0700 Subject: [PATCH]