Import LLVM openFileForRead and openFileForWrite.

This commit is contained in:
Peter Johnson
2017-08-13 00:37:14 -07:00
parent 7d9e6b7e22
commit 1c1fbf14cf
7 changed files with 380 additions and 134 deletions

View File

@@ -19,6 +19,18 @@
#include "llvm/SmallVector.h"
#include "llvm/StringRef.h"
#if defined(_MSC_VER)
#ifndef STDIN_FILENO
# define STDIN_FILENO 0
#endif
#ifndef STDOUT_FILENO
# define STDOUT_FILENO 1
#endif
#ifndef STDERR_FILENO
# define STDERR_FILENO 2
#endif
#endif
using namespace wpi;
llvm::StringRef raw_istream::getline(llvm::SmallVectorImpl<char>& buf,