Index: lib/Bitcode/NaCl/Analysis/NaClBitcodeAnalyzer.cpp |
diff --git a/lib/Bitcode/NaCl/Analysis/NaClBitcodeAnalyzer.cpp b/lib/Bitcode/NaCl/Analysis/NaClBitcodeAnalyzer.cpp |
index 09c507822a4374a8fb97f4fc899b3d277fda8b69..3caab42e06d3067c258825071119ab50a6c9da48 100644 |
--- a/lib/Bitcode/NaCl/Analysis/NaClBitcodeAnalyzer.cpp |
+++ b/lib/Bitcode/NaCl/Analysis/NaClBitcodeAnalyzer.cpp |
@@ -30,13 +30,17 @@ |
// dumping records, and one for collecting distribution stats for |
// printing. This should simplify the code. |
-/// Error - All bitcode analysis errors go through this function, making this a |
-/// good place to breakpoint if debugging. |
-static bool Error(const llvm::Twine &Err) { |
+namespace { |
+ |
+// Generates an error message when outside parsing, and no |
+// corresponding bit position is known. |
+bool Error(const llvm::Twine &Err) { |
llvm::errs() << Err << "\n"; |
return true; |
} |
+} // End of anonymous namespace. |
+ |
namespace llvm { |
// Parses all bitcode blocks, and collects distribution of records in |
@@ -60,11 +64,6 @@ public: |
virtual ~PNaClBitcodeAnalyzerParser() {} |
- 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); |
// Returns the string defining the indentation to use with respect |
@@ -247,11 +246,6 @@ protected: |
Indent = Context->GetIndentation(); |
} |
- virtual bool Error(const std::string &Message) { |
- // Use local error routine so that all errors are treated uniformly. |
- return ::Error(Message); |
- } |
- |
// Called once the block has been entered by the bitstream reader. |
// Argument NumWords is set to the number of words in the |
// corresponding block. |