Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here. This is mostly mechanical from a custom clang-tidy check, with a lot of manual fixups. It uncovers a lot of minor inefficiencies. This doesn't actually modify StringRef yet, I'll do that in a follow-up.
This commit is contained in:
@@ -1696,7 +1696,7 @@ class VMAddressProvider {
|
||||
|
||||
public:
|
||||
VMAddressProvider(ObjectFile::Type Type, llvm::StringRef SegmentName)
|
||||
: ObjectType(Type), SegmentName(SegmentName) {}
|
||||
: ObjectType(Type), SegmentName(std::string(SegmentName)) {}
|
||||
|
||||
std::string GetNextSegmentName() const {
|
||||
return llvm::formatv("{0}[{1}]", SegmentName, SegmentCount).str();
|
||||
|
||||
Reference in New Issue
Block a user