mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
Remove many superfluous SmallString::str() calls.
Now that SmallString is a first-class citizen, most SmallString::str() calls are not required. This patch removes a whole bunch of them, yet there are lots more. There are two use cases where str() is really needed: 1) To use one of StringRef member functions which is not available in SmallString. 2) To convert to std::string, as StringRef implicitly converts while SmallString do not. We may wish to change this, but it may introduce ambiguity. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232622 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1091,7 +1091,7 @@ unsigned FilterChooser::getDecoderIndex(DecoderSet &Decoders,
|
||||
// overkill for now, though.
|
||||
|
||||
// Make sure the predicate is in the table.
|
||||
Decoders.insert(Decoder.str());
|
||||
Decoders.insert(StringRef(Decoder));
|
||||
// Now figure out the index for when we write out the table.
|
||||
DecoderSet::const_iterator P = std::find(Decoders.begin(),
|
||||
Decoders.end(),
|
||||
|
||||
Reference in New Issue
Block a user