summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-08-28 11:33:32 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-08-28 11:33:32 +0200
commit05ead076b4a58cd18eee35ea97f9577333f6af38 (patch)
tree39382cfca3cc3d1fc62d6f796eff316c1575a27f /compilerplugins
parent854bf7399a635928e6c155ef2246d636ab11ec13 (diff)
Adapt compilerplugins to Clang trunk towards 3.6
Change-Id: Id1ce6c59f705f9c42855995e0ad590c6a3646613
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/compat.hxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/compilerplugins/clang/compat.hxx b/compilerplugins/clang/compat.hxx
index 5533e8f2890e..e6ce98ea64bd 100644
--- a/compilerplugins/clang/compat.hxx
+++ b/compilerplugins/clang/compat.hxx
@@ -151,7 +151,13 @@ inline unsigned getCustomDiagID(
inline std::unique_ptr<llvm::raw_fd_ostream> create_raw_fd_ostream(
char const * Filename, std::string & ErrorInfo)
{
-#if (__clang_major__ == 3 && __clang_minor__ >= 5) || __clang_major__ > 3
+#if (__clang_major__ == 3 && __clang_minor__ >= 6) || __clang_major__ > 3
+ std::error_code ec;
+ std::unique_ptr<llvm::raw_fd_ostream> s(
+ new llvm::raw_fd_ostream(Filename, ec, llvm::sys::fs::F_None));
+ ErrorInfo = ec ? "error: " + ec.message() : std::string();
+ return s;
+#elif __clang_major__ == 3 && __clang_minor__ == 5
return std::unique_ptr<llvm::raw_fd_ostream>(
new llvm::raw_fd_ostream(Filename, ErrorInfo, llvm::sys::fs::F_None));
#else