From: Marianne Mailhot-Sarrasin Date: Thu, 14 Apr 2016 14:47:37 +0000 (+0000) Subject: clang-format: Allow include of clangFormat.h in managed context X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1390bb1e93bad8b48d24521530d22eb93009e571;p=clang clang-format: Allow include of clangFormat.h in managed context Including VirtualFileSystem.h in the clangFormat.h indirectly includes . This header is blocked when compiling with /clr. Patch by Maxime Beaulieu Differential Revision: http://reviews.llvm.org/D19064 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266319 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Format/Format.h b/include/clang/Format/Format.h index fbb7ab46df..2acec268a2 100644 --- a/include/clang/Format/Format.h +++ b/include/clang/Format/Format.h @@ -16,7 +16,6 @@ #define LLVM_CLANG_FORMAT_FORMAT_H #include "clang/Basic/LangOptions.h" -#include "clang/Basic/VirtualFileSystem.h" #include "clang/Tooling/Core/Replacement.h" #include "llvm/ADT/ArrayRef.h" #include @@ -27,6 +26,10 @@ class Lexer; class SourceManager; class DiagnosticConsumer; +namespace vfs { +class FileSystem; +} + namespace format { enum class ParseError { Success = 0, Error, Unsuitable }; diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index 37788df23d..cc11d3df40 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -22,6 +22,7 @@ #include "clang/Basic/Diagnostic.h" #include "clang/Basic/DiagnosticOptions.h" #include "clang/Basic/SourceManager.h" +#include "clang/Basic/VirtualFileSystem.h" #include "clang/Lex/Lexer.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/Allocator.h"