Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(483)

Unified Diff: lib/Bitcode/NaCl/Analysis/NaClCompress.cpp

Issue 986453002: Additional clean ups on errors in bitcode parsing. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Fix comment. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/Bitcode/NaCl/Analysis/NaClBitcodeAnalyzer.cpp ('k') | lib/Bitcode/NaCl/Analysis/NaClObjDump.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Bitcode/NaCl/Analysis/NaClCompress.cpp
diff --git a/lib/Bitcode/NaCl/Analysis/NaClCompress.cpp b/lib/Bitcode/NaCl/Analysis/NaClCompress.cpp
index 05d1a6937b843be174bfe2c99cdd573df614022a..18465eed43587b202b193aebc0b948d0f124ae71 100644
--- a/lib/Bitcode/NaCl/Analysis/NaClCompress.cpp
+++ b/lib/Bitcode/NaCl/Analysis/NaClCompress.cpp
@@ -48,14 +48,12 @@
#include "llvm/Bitcode/NaCl/NaClCompressBlockDist.h"
#include "llvm/Bitcode/NaCl/NaClReaderWriter.h"
-using namespace llvm;
-
namespace {
using namespace llvm;
-/// Error - All bitcode analysis errors go through this function,
-/// making this a good place to breakpoint if debugging.
+// Generates an error message when outside parsing, and no
+// corresponding bit position is known.
static bool Error(const std::string &Err) {
errs() << Err << "\n";
return true;
@@ -478,11 +476,6 @@ public:
virtual ~NaClAnalyzeParser() {}
- virtual bool Error(const std::string &Message) {
- // Use local error routine so that all errors are treated uniformly.
- return ::Error(Message);
- }
-
virtual bool ParseBlock(unsigned BlockID);
const NaClBitcodeCompressor::CompressFlags &Flags;
@@ -529,11 +522,6 @@ protected:
}
public:
- virtual bool Error(const std::string &Message) {
- // Use local error routine so that all errors are treated uniformly.
- return ::Error(Message);
- }
-
virtual bool ParseBlock(unsigned BlockID) {
NaClBlockAnalyzeParser Parser(BlockID, this);
return Parser.ParseThisBlock();
@@ -1212,11 +1200,6 @@ public:
virtual ~NaClBitcodeCopyParser() {}
- virtual bool Error(const std::string &Message) {
- // Use local error routine so that all errors are treated uniformly.
- return ::Error(Message);
- }
-
virtual bool ParseBlock(unsigned BlockID);
const NaClBitcodeCompressor::CompressFlags &Flags;
@@ -1257,11 +1240,6 @@ protected:
Context(EnclosingParser->Context)
{}
- virtual bool Error(const std::string &Message) {
- // Use local error routine so that all errors are treated uniformly.
- return ::Error(Message);
- }
-
/// Returns the set of (global) block abbreviations defined for the
/// given block ID.
BlockAbbrevs *GetGlobalAbbrevs(unsigned BlockID) {
« no previous file with comments | « lib/Bitcode/NaCl/Analysis/NaClBitcodeAnalyzer.cpp ('k') | lib/Bitcode/NaCl/Analysis/NaClObjDump.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698