[BOLT] Fix section names under `-generate-link-sections`

Summary:
Use proper function while printing modified function name to file.

(cherry picked from FBD19791847)
This commit is contained in:
Maksim Panchenko 2020-02-07 09:39:38 -08:00
parent 0080d74506
commit 41de03b8e9
1 changed files with 2 additions and 2 deletions

View File

@ -457,7 +457,7 @@ void ReorderFunctions::runOnFunctions(BinaryContext &BC) {
continue;
if (FuncsFile)
*FuncsFile << Func->getOneName().data() << "\n";
*FuncsFile << Func->getOneName().str() << '\n';
if (LinkSectionsFile) {
const char *Indent = "";
@ -471,7 +471,7 @@ void ReorderFunctions::runOnFunctions(BinaryContext &BC) {
continue;
Name = Name.substr(0, SlashPos);
}
*LinkSectionsFile << Indent << ".text." << Name.data() << "\n";
*LinkSectionsFile << Indent << ".text." << Name.str() << '\n';
Indent = " ";
}
}