Initial import of LLVM 3.3

This commit is contained in:
Pascal Junod
2014-01-06 11:44:52 +01:00
parent 0906a82c26
commit 51299c090d
9524 changed files with 720814 additions and 262387 deletions
+5 -5
View File
@@ -9,6 +9,7 @@
#include "llvm-c/BitWriter.h"
#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
@@ -17,12 +18,11 @@ using namespace llvm;
int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path) {
std::string ErrorInfo;
raw_fd_ostream OS(Path, ErrorInfo,
raw_fd_ostream::F_Binary);
raw_fd_ostream OS(Path, ErrorInfo, raw_fd_ostream::F_Binary);
if (!ErrorInfo.empty())
return -1;
WriteBitcodeToFile(unwrap(M), OS);
return 0;
}
@@ -30,7 +30,7 @@ int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path) {
int LLVMWriteBitcodeToFD(LLVMModuleRef M, int FD, int ShouldClose,
int Unbuffered) {
raw_fd_ostream OS(FD, ShouldClose, Unbuffered);
WriteBitcodeToFile(unwrap(M), OS);
return 0;
}