[Lldb-commits] [PATCH] D145566: [lldb] Add RegisterFlags class
David Spickett via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 8 06:32:47 PST 2023
DavidSpickett added inline comments.
================
Comment at: lldb/include/lldb/Target/RegisterFlags.h:20
+ public:
+ Field(const std::string &name, unsigned start, unsigned end,
+ const std::string &type)
----------------
DavidSpickett wrote:
> tschuett wrote:
> > There are a lot of `const std::string& ` . Are you allowed to use `llvm::StringRef` or even `std::string_view` in LLDB?
> We can use `llvm::StringRef`, but in this case this will be passed a std::string so I just defaulted to the most conservative version (this happens in a later patch).
>
> I suppose you could move here, or pass by copy and assume the compiler will figure it out.
>
>
Actually, it doesn't have to be a std::string the XML parser does give you a StringRef.
I will update this and the subsequent patches.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145566/new/
https://reviews.llvm.org/D145566
More information about the lldb-commits
mailing list