[libclc] r186610 - Fix build with LLVM 3.4
Aaron Watry
awatry at gmail.com
Thu Jul 18 14:24:36 PDT 2013
Author: awatry
Date: Thu Jul 18 16:24:35 2013
New Revision: 186610
URL: http://llvm.org/viewvc/llvm-project?rev=186610&view=rev
Log:
Fix build with LLVM 3.4
F_Binary and friends were moved to include/Support/FileSystem.h
v2: Maintain compatibility with LLVM 3.3
Signed-off-by: Aaron Watry <awatry at gmail.com>
Modified:
libclc/trunk/utils/prepare-builtins.cpp
Modified: libclc/trunk/utils/prepare-builtins.cpp
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/utils/prepare-builtins.cpp?rev=186610&r1=186609&r2=186610&view=diff
==============================================================================
--- libclc/trunk/utils/prepare-builtins.cpp (original)
+++ libclc/trunk/utils/prepare-builtins.cpp Thu Jul 18 16:24:35 2013
@@ -10,6 +10,7 @@
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/system_error.h"
#include "llvm/Support/ToolOutputFile.h"
+#include "llvm/Config/config.h"
using namespace llvm;
@@ -66,7 +67,11 @@ int main(int argc, char **argv) {
std::string ErrorInfo;
OwningPtr<tool_output_file> Out
(new tool_output_file(OutputFilename.c_str(), ErrorInfo,
+#if LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR > 3)
+ sys::fs::F_Binary));
+#else
raw_fd_ostream::F_Binary));
+#endif
if (!ErrorInfo.empty()) {
errs() << ErrorInfo << '\n';
exit(1);
More information about the cfe-commits
mailing list