Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/include/llvm/CGData/CodeGenData.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ std::unique_ptr<Module> loadModuleForTwoRounds(BitcodeModule &OrigModule,
Expected<stable_hash> mergeCodeGenData(ArrayRef<StringRef> ObjectFiles);

void warn(Error E, StringRef Whence = "");
void warn(Twine Message, std::string Whence = "", std::string Hint = "");
void warn(Twine Message, StringRef Whence = "", StringRef Hint = "");

} // end namespace cgdata

Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/CGData/CodeGenData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Expected<Header> Header::readFromBuffer(const unsigned char *Curr) {

namespace cgdata {

void warn(Twine Message, std::string Whence, std::string Hint) {
void warn(Twine Message, StringRef Whence, StringRef Hint) {
WithColor::warning();
if (!Whence.empty())
errs() << Whence << ": ";
Expand All @@ -216,7 +216,7 @@ void warn(Twine Message, std::string Whence, std::string Hint) {
void warn(Error E, StringRef Whence) {
if (E.isA<CGDataError>()) {
handleAllErrors(std::move(E), [&](const CGDataError &IPE) {
warn(IPE.message(), Whence.str(), "");
warn(IPE.message(), Whence, "");
});
}
}
Expand Down