diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-13 01:25:41 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-13 01:25:41 +0000 |
commit | a20bcb9969aa4f0d989e8f039d6af3a43357d310 (patch) | |
tree | 36510cd935429f5b7d3d5ff4993244e25e8ad902 /lib | |
parent | aa48b83e805511c9d6422bf0a504c2eea36580ec (diff) | |
download | llvm-a20bcb9969aa4f0d989e8f039d6af3a43357d310.tar.gz llvm-a20bcb9969aa4f0d989e8f039d6af3a43357d310.tar.bz2 llvm-a20bcb9969aa4f0d989e8f039d6af3a43357d310.tar.xz |
Remove all uses of 'using std::error_code' from headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210866 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Bitcode/Reader/BitcodeReader.cpp | 1 | ||||
-rw-r--r-- | lib/Bitcode/Reader/BitcodeReader.h | 58 | ||||
-rw-r--r-- | lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp | 1 | ||||
-rw-r--r-- | lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 1 | ||||
-rw-r--r-- | lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h | 4 |
5 files changed, 33 insertions, 32 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index a5eec0f70d..cafdd12529 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/lib/Bitcode/Reader/BitcodeReader.cpp @@ -26,6 +26,7 @@ #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; +using std::error_code; enum { SWITCH_INST_MAGIC = 0x4B5 // May 2012 => 1205 => Hex diff --git a/lib/Bitcode/Reader/BitcodeReader.h b/lib/Bitcode/Reader/BitcodeReader.h index 7a1b3f2d03..36849d4045 100644 --- a/lib/Bitcode/Reader/BitcodeReader.h +++ b/lib/Bitcode/Reader/BitcodeReader.h @@ -26,7 +26,6 @@ #include <vector> namespace llvm { -using std::error_code; class MemoryBuffer; class LLVMContext; @@ -220,8 +219,8 @@ public: InvalidValue // Invalid version, inst number, attr number, etc }; - error_code Error(ErrorType E) { - return error_code(E, BitcodeErrorCategory()); + std::error_code Error(ErrorType E) { + return std::error_code(E, BitcodeErrorCategory()); } explicit BitcodeReader(MemoryBuffer *buffer, LLVMContext &C) @@ -250,17 +249,17 @@ public: bool isMaterializable(const GlobalValue *GV) const override; bool isDematerializable(const GlobalValue *GV) const override; - error_code Materialize(GlobalValue *GV) override; - error_code MaterializeModule(Module *M) override; + std::error_code Materialize(GlobalValue *GV) override; + std::error_code MaterializeModule(Module *M) override; void Dematerialize(GlobalValue *GV) override; /// @brief Main interface to parsing a bitcode buffer. /// @returns true if an error occurred. - error_code ParseBitcodeInto(Module *M); + std::error_code ParseBitcodeInto(Module *M); /// @brief Cheap mechanism to just extract module triple /// @returns true if an error occurred. - error_code ParseTriple(std::string &Triple); + std::error_code ParseTriple(std::string &Triple); static uint64_t decodeSignRotatedValue(uint64_t V); @@ -347,28 +346,29 @@ private: return getFnValueByID(ValNo, Ty); } - error_code ParseAttrKind(uint64_t Code, Attribute::AttrKind *Kind); - error_code ParseModule(bool Resume); - error_code ParseAttributeBlock(); - error_code ParseAttributeGroupBlock(); - error_code ParseTypeTable(); - error_code ParseTypeTableBody(); - - error_code ParseValueSymbolTable(); - error_code ParseConstants(); - error_code RememberAndSkipFunctionBody(); - error_code ParseFunctionBody(Function *F); - error_code GlobalCleanup(); - error_code ResolveGlobalAndAliasInits(); - error_code ParseMetadata(); - error_code ParseMetadataAttachment(); - error_code ParseModuleTriple(std::string &Triple); - error_code ParseUseLists(); - error_code InitStream(); - error_code InitStreamFromBuffer(); - error_code InitLazyStream(); - error_code FindFunctionInStream(Function *F, - DenseMap<Function*, uint64_t>::iterator DeferredFunctionInfoIterator); + std::error_code ParseAttrKind(uint64_t Code, Attribute::AttrKind *Kind); + std::error_code ParseModule(bool Resume); + std::error_code ParseAttributeBlock(); + std::error_code ParseAttributeGroupBlock(); + std::error_code ParseTypeTable(); + std::error_code ParseTypeTableBody(); + + std::error_code ParseValueSymbolTable(); + std::error_code ParseConstants(); + std::error_code RememberAndSkipFunctionBody(); + std::error_code ParseFunctionBody(Function *F); + std::error_code GlobalCleanup(); + std::error_code ResolveGlobalAndAliasInits(); + std::error_code ParseMetadata(); + std::error_code ParseMetadataAttachment(); + std::error_code ParseModuleTriple(std::string &Triple); + std::error_code ParseUseLists(); + std::error_code InitStream(); + std::error_code InitStreamFromBuffer(); + std::error_code InitLazyStream(); + std::error_code FindFunctionInStream( + Function *F, + DenseMap<Function *, uint64_t>::iterator DeferredFunctionInfoIterator); }; } // End llvm namespace diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp index c1eb0fd31f..b1558c029f 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp @@ -23,6 +23,7 @@ using namespace llvm; using namespace llvm::object; +using std::error_code; #define DEBUG_TYPE "dyld" diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index 6ba24b9b59..ec825b82ee 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -27,6 +27,7 @@ using namespace llvm; using namespace llvm::object; +using std::error_code; #define DEBUG_TYPE "dyld" diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h index 53cf8f99ff..b84883310b 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h @@ -20,11 +20,9 @@ using namespace llvm; namespace llvm { -using std::error_code; - namespace { // Helper for extensive error checking in debug builds. -error_code Check(error_code Err) { +std::error_code Check(std::error_code Err) { if (Err) { report_fatal_error(Err.message()); } |