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:
parent
8606f5bffd
commit
8b57985332
@ -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 {
|
||||
|
@ -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,
|
||||
|
@ -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";
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user