mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
DetailedRecordsBackend.cpp - printSectionHeading - avoid std::string creation/copies.
Don't create std::string from constant c-strings or pass std::string by value - we can use StringRef instead.
This commit is contained in:
parent
9ec7689e46
commit
910cf30f57
@ -45,7 +45,7 @@ public:
|
||||
void printVariables(raw_ostream &OS);
|
||||
void printClasses(raw_ostream &OS);
|
||||
void printRecords(raw_ostream &OS);
|
||||
void printSectionHeading(std::string Title, int Count, raw_ostream &OS);
|
||||
void printSectionHeading(StringRef Title, int Count, raw_ostream &OS);
|
||||
void printDefms(Record *Rec, raw_ostream &OS);
|
||||
void printTemplateArgs(Record *Rec, raw_ostream &OS);
|
||||
void printSuperclasses(Record *Rec, raw_ostream &OS);
|
||||
@ -113,7 +113,7 @@ void DetailedRecordsEmitter::printRecords(raw_ostream &OS) {
|
||||
|
||||
// Print a section heading with the name of the section and
|
||||
// the item count.
|
||||
void DetailedRecordsEmitter::printSectionHeading(std::string Title, int Count,
|
||||
void DetailedRecordsEmitter::printSectionHeading(StringRef Title, int Count,
|
||||
raw_ostream &OS) {
|
||||
OS << formatv("\n{0} {1} ({2}) {0}\n", "--------------------", Title, Count);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user