[llvm] r286326 - Bitcode: Remove the remnants of the BitcodeDiagnosticInfo class.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 8 17:09:12 PST 2016
Author: pcc
Date: Tue Nov 8 19:09:11 2016
New Revision: 286326
URL: http://llvm.org/viewvc/llvm-project?rev=286326&view=rev
Log:
Bitcode: Remove the remnants of the BitcodeDiagnosticInfo class.
The BitcodeReader no longer produces BitcodeDiagnosticInfo diagnostics.
The only remaining reference was in the gold plugin; the code there has been
dead since we stopped producing InvalidBitcodeSignature error codes in r225562.
While at it remove the InvalidBitcodeSignature error code.
Modified:
llvm/trunk/include/llvm/Bitcode/ReaderWriter.h
llvm/trunk/include/llvm/IR/DiagnosticInfo.h
llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/trunk/tools/gold/gold-plugin.cpp
Modified: llvm/trunk/include/llvm/Bitcode/ReaderWriter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitcode/ReaderWriter.h?rev=286326&r1=286325&r2=286326&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Bitcode/ReaderWriter.h (original)
+++ llvm/trunk/include/llvm/Bitcode/ReaderWriter.h Tue Nov 8 19:09:11 2016
@@ -184,26 +184,11 @@ namespace llvm {
}
const std::error_category &BitcodeErrorCategory();
- enum class BitcodeError { InvalidBitcodeSignature = 1, CorruptedBitcode };
+ enum class BitcodeError { CorruptedBitcode = 1 };
inline std::error_code make_error_code(BitcodeError E) {
return std::error_code(static_cast<int>(E), BitcodeErrorCategory());
}
- class BitcodeDiagnosticInfo : public DiagnosticInfo {
- const Twine &Msg;
- std::error_code EC;
-
- public:
- BitcodeDiagnosticInfo(std::error_code EC, DiagnosticSeverity Severity,
- const Twine &Msg);
- void print(DiagnosticPrinter &DP) const override;
- std::error_code getError() const { return EC; }
-
- static bool classof(const DiagnosticInfo *DI) {
- return DI->getKind() == DK_Bitcode;
- }
- };
-
} // End llvm namespace
namespace std {
Modified: llvm/trunk/include/llvm/IR/DiagnosticInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DiagnosticInfo.h?rev=286326&r1=286325&r2=286326&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DiagnosticInfo.h (original)
+++ llvm/trunk/include/llvm/IR/DiagnosticInfo.h Tue Nov 8 19:09:11 2016
@@ -49,7 +49,6 @@ enum DiagnosticSeverity : char {
/// \brief Defines the different supported kind of a diagnostic.
/// This enum should be extended with a new ID for each added concrete subclass.
enum DiagnosticKind {
- DK_Bitcode,
DK_InlineAsm,
DK_ResourceLimit,
DK_StackSize,
Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=286326&r1=286325&r2=286326&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Tue Nov 8 19:09:11 2016
@@ -6621,8 +6621,6 @@ class BitcodeErrorCategoryType : public
std::string message(int IE) const override {
BitcodeError E = static_cast<BitcodeError>(IE);
switch (E) {
- case BitcodeError::InvalidBitcodeSignature:
- return "Invalid bitcode signature";
case BitcodeError::CorruptedBitcode:
return "Corrupted bitcode";
}
Modified: llvm/trunk/tools/gold/gold-plugin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=286326&r1=286325&r2=286326&view=diff
==============================================================================
--- llvm/trunk/tools/gold/gold-plugin.cpp (original)
+++ llvm/trunk/tools/gold/gold-plugin.cpp Tue Nov 8 19:09:11 2016
@@ -368,12 +368,6 @@ ld_plugin_status onload(ld_plugin_tv *tv
}
static void diagnosticHandler(const DiagnosticInfo &DI) {
- if (const auto *BDI = dyn_cast<BitcodeDiagnosticInfo>(&DI)) {
- std::error_code EC = BDI->getError();
- if (EC == BitcodeError::InvalidBitcodeSignature)
- return;
- }
-
std::string ErrStorage;
{
raw_string_ostream OS(ErrStorage);
More information about the llvm-commits
mailing list