nickdesaulniers abandoned this revision.
nickdesaulniers added a comment.
Just going to rip out llvm::StringView.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148181/new/
https://reviews.llvm.org/D148181
__
nickdesaulniers added inline comments.
Comment at: llvm/lib/Demangle/Demangle.cpp:31
std::string Result;
- const char *S = MangledName.c_str();
+ std::string Copy = MangledName.str();
+ const char *S = Copy.data();
erichkeane wrote:
> nickdesaulniers wrote:
erichkeane added inline comments.
Comment at: llvm/lib/Demangle/Demangle.cpp:31
std::string Result;
- const char *S = MangledName.c_str();
+ std::string Copy = MangledName.str();
+ const char *S = Copy.data();
nickdesaulniers wrote:
> nickdesaulniers wrote:
nickdesaulniers added inline comments.
Comment at: llvm/lib/Demangle/Demangle.cpp:31
std::string Result;
- const char *S = MangledName.c_str();
+ std::string Copy = MangledName.str();
+ const char *S = Copy.data();
nickdesaulniers wrote:
> erichkeane wrote:
nickdesaulniers added inline comments.
Comment at: llvm/lib/Demangle/Demangle.cpp:31
std::string Result;
- const char *S = MangledName.c_str();
+ std::string Copy = MangledName.str();
+ const char *S = Copy.data();
erichkeane wrote:
> `std::string` is impli
erichkeane added a comment.
We're C++17 compilation now, so we should be able to use `std::string_view`
(and I think we're supposed to?).
Comment at: llvm/lib/Demangle/Demangle.cpp:31
std::string Result;
- const char *S = MangledName.c_str();
+ std::string Copy = MangledN
MaskRay added a comment.
Unfortunately we cannot do this. `LLVMSupport` depends on `LLVMDemangle`. Due
to library layering `LLVMDemangle` cannot depend on `LLVMSupport`.
The layering may look weird, but that's what we have.
Using `std::string_view` may possibly be fine.
Repository:
rG LLVM G
sbc100 added inline comments.
Comment at: llvm/lib/Demangle/Demangle.cpp:29
-std::string llvm::demangle(const std::string &MangledName) {
+std::string llvm::demangle(const StringRef MangledName) {
std::string Result;
Should `const` be removed? (i.e. is Stri
nickdesaulniers added a comment.
There's a few more callsites I'd like to clean up, tomorrow:
- llvm/tools/llvm-objdump/llvm-objdump.cpp
- llvm/tools/llvm-objdump/XCOFFDump.cpp
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148181/new/
https://revi
nickdesaulniers created this revision.
nickdesaulniers added reviewers: erichkeane, MaskRay.
Herald added subscribers: pmatos, asb, hiraditya, arichardson, sbc100, emaste.
Herald added a reviewer: jhenderson.
Herald added projects: lld-macho, All.
Herald added a reviewer: lld-macho.
nickdesaulniers
10 matches
Mail list logo