forked from OSchip/llvm-project
[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:
parent
0080d74506
commit
41de03b8e9
|
@ -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 = " ";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue