SimplifyCFG: Don't generate invalid code for switch used to initialize
[oota-llvm.git] / lib / Support / DataStream.cpp
index 0e8a717b51521c23dde0fd64f88994ce5d2ec1c6..94d14a5e36b09c77a1c9ce6ae7ae95db3f038398 100644 (file)
@@ -67,7 +67,7 @@ public:
     if (Filename == "-") {
       Fd = 0;
       sys::Program::ChangeStdinToBinary();
-      return error_code();
+      return error_code::success();
     }
   
     int OpenFlags = O_RDONLY;
@@ -77,7 +77,7 @@ public:
     Fd = ::open(Filename.c_str(), OpenFlags);
     if (Fd == -1)
       return error_code(errno, posix_category());
-    return error_code();
+    return error_code::success();
   }
 };