Skip to content

Commit 4a96081

Browse files
[clang-linker-wrapper] Fix a warning
This patch fixes: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:642:6: error: unused function 'diagnosticHandler' [-Werror,-Wunused-function]
1 parent 680901e commit 4a96081

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -639,28 +639,6 @@ Expected<StringRef> linkDevice(ArrayRef<StringRef> InputFiles,
639639
}
640640
}
641641

642-
void diagnosticHandler(const DiagnosticInfo &DI) {
643-
std::string ErrStorage;
644-
raw_string_ostream OS(ErrStorage);
645-
DiagnosticPrinterRawOStream DP(OS);
646-
DI.print(DP);
647-
648-
switch (DI.getSeverity()) {
649-
case DS_Error:
650-
WithColor::error(errs(), LinkerExecutable) << ErrStorage << "\n";
651-
break;
652-
case DS_Warning:
653-
WithColor::warning(errs(), LinkerExecutable) << ErrStorage << "\n";
654-
break;
655-
case DS_Note:
656-
WithColor::note(errs(), LinkerExecutable) << ErrStorage << "\n";
657-
break;
658-
case DS_Remark:
659-
WithColor::remark(errs()) << ErrStorage << "\n";
660-
break;
661-
}
662-
}
663-
664642
Expected<StringRef> writeOffloadFile(const OffloadFile &File) {
665643
const OffloadBinary &Binary = *File.getBinary();
666644

0 commit comments

Comments
 (0)