[llvm] r210783 - Replace llvm::error_code with std::error_code.

Rafael Espindola rafael.espindola at gmail.com
Thu Jun 12 07:11:22 PDT 2014


Author: rafael
Date: Thu Jun 12 09:11:22 2014
New Revision: 210783

URL: http://llvm.org/viewvc/llvm-project?rev=210783&view=rev
Log:
Replace llvm::error_code with std::error_code.

Modified:
    llvm/trunk/include/llvm/Support/ErrorOr.h
    llvm/trunk/include/llvm/Support/YAMLTraits.h
    llvm/trunk/lib/Support/Windows/Path.inc
    llvm/trunk/tools/obj2yaml/obj2yaml.h
    llvm/trunk/unittests/Transforms/DebugIR/DebugIR.cpp

Modified: llvm/trunk/include/llvm/Support/ErrorOr.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ErrorOr.h?rev=210783&r1=210782&r2=210783&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/ErrorOr.h (original)
+++ llvm/trunk/include/llvm/Support/ErrorOr.h Thu Jun 12 09:11:22 2014
@@ -103,7 +103,7 @@ public:
     new (getErrorStorage()) error_code(make_error_code(ErrorCode));
   }
 
-  ErrorOr(llvm::error_code EC) : HasError(true) {
+  ErrorOr(std::error_code EC) : HasError(true) {
     new (getErrorStorage()) error_code(EC);
   }
 

Modified: llvm/trunk/include/llvm/Support/YAMLTraits.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/YAMLTraits.h?rev=210783&r1=210782&r2=210783&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/YAMLTraits.h (original)
+++ llvm/trunk/include/llvm/Support/YAMLTraits.h Thu Jun 12 09:11:22 2014
@@ -880,7 +880,7 @@ public:
   ~Input();
 
   // Check if there was an syntax or semantic error during parsing.
-  llvm::error_code error();
+  std::error_code error();
 
 private:
   bool outputting() override;
@@ -988,7 +988,7 @@ private:
   llvm::SourceMgr                     SrcMgr; // must be before Strm
   std::unique_ptr<llvm::yaml::Stream> Strm;
   std::unique_ptr<HNode>              TopNode;
-  llvm::error_code                    EC;
+  std::error_code                     EC;
   llvm::BumpPtrAllocator              StringAllocator;
   llvm::yaml::document_iterator       DocIterator;
   std::vector<bool>                   BitValuesUsed;

Modified: llvm/trunk/lib/Support/Windows/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Path.inc?rev=210783&r1=210782&r2=210783&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/Path.inc (original)
+++ llvm/trunk/lib/Support/Windows/Path.inc Thu Jun 12 09:11:22 2014
@@ -865,7 +865,7 @@ bool home_directory(SmallVectorImpl<char
 } // end namespace path
 
 namespace windows {
-llvm::error_code UTF8ToUTF16(llvm::StringRef utf8,
+std::error_code UTF8ToUTF16(llvm::StringRef utf8,
                              llvm::SmallVectorImpl<wchar_t> &utf16) {
   if (!utf8.empty()) {
     int len = ::MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, utf8.begin(),
@@ -888,10 +888,10 @@ llvm::error_code UTF8ToUTF16(llvm::Strin
   utf16.push_back(0);
   utf16.pop_back();
 
-  return llvm::error_code();
+  return std::error_code();
 }
 
-llvm::error_code UTF16ToUTF8(const wchar_t *utf16, size_t utf16_len,
+std::error_code UTF16ToUTF8(const wchar_t *utf16, size_t utf16_len,
                              llvm::SmallVectorImpl<char> &utf8) {
   if (utf16_len) {
     // Get length.
@@ -916,7 +916,7 @@ llvm::error_code UTF16ToUTF8(const wchar
   utf8.push_back(0);
   utf8.pop_back();
 
-  return llvm::error_code();
+  return std::error_code();
 }
 } // end namespace windows
 } // end namespace sys

Modified: llvm/trunk/tools/obj2yaml/obj2yaml.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/obj2yaml/obj2yaml.h?rev=210783&r1=210782&r2=210783&view=diff
==============================================================================
--- llvm/trunk/tools/obj2yaml/obj2yaml.h (original)
+++ llvm/trunk/tools/obj2yaml/obj2yaml.h Thu Jun 12 09:11:22 2014
@@ -17,9 +17,9 @@
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/system_error.h"
 
-llvm::error_code coff2yaml(llvm::raw_ostream &Out,
-                           const llvm::object::COFFObjectFile &Obj);
-llvm::error_code elf2yaml(llvm::raw_ostream &Out,
-                          const llvm::object::ObjectFile &Obj);
+std::error_code coff2yaml(llvm::raw_ostream &Out,
+                          const llvm::object::COFFObjectFile &Obj);
+std::error_code elf2yaml(llvm::raw_ostream &Out,
+                         const llvm::object::ObjectFile &Obj);
 
 #endif

Modified: llvm/trunk/unittests/Transforms/DebugIR/DebugIR.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Transforms/DebugIR/DebugIR.cpp?rev=210783&r1=210782&r2=210783&view=diff
==============================================================================
--- llvm/trunk/unittests/Transforms/DebugIR/DebugIR.cpp (original)
+++ llvm/trunk/unittests/Transforms/DebugIR/DebugIR.cpp Thu Jun 12 09:11:22 2014
@@ -57,7 +57,7 @@ void insertCUDescriptor(Module *M, Strin
 bool removeIfExists(StringRef Path) {
   // This is an approximation, on error we don't know in general if the file
   // existed or not.
-  llvm::error_code EC = sys::fs::remove(Path, false);
+  std::error_code EC = sys::fs::remove(Path, false);
   return EC != std::errc::no_such_file_or_directory;
 }
 





More information about the llvm-commits mailing list