1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

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.

llvm-svn: 286326
This commit is contained in:
Peter Collingbourne 2016-11-09 01:09:11 +00:00
parent 8606f5bffd
commit 8b57985332
4 changed files with 1 additions and 25 deletions

View File

@ -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 {

View File

@ -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,

View File

@ -6621,8 +6621,6 @@ class BitcodeErrorCategoryType : public std::error_category {
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";
}

View File

@ -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);