diff options
| author | Marianne Mailhot-Sarrasin <marianne.mailhot.sarrasin@gmail.com> | 2016-04-14 14:47:37 +0000 |
|---|---|---|
| committer | Marianne Mailhot-Sarrasin <marianne.mailhot.sarrasin@gmail.com> | 2016-04-14 14:47:37 +0000 |
| commit | 4988fa1bc58cbe6e076ab76f2da91215d8d37771 (patch) | |
| tree | c3856e892e287a7f8dc2e052b577b4fc64cdb1e1 /clang | |
| parent | 735bbaa1d9128805c5e316555e4749cb4260f9ce (diff) | |
| download | bcm5719-llvm-4988fa1bc58cbe6e076ab76f2da91215d8d37771.tar.gz bcm5719-llvm-4988fa1bc58cbe6e076ab76f2da91215d8d37771.zip | |
clang-format: Allow include of clangFormat.h in managed context
Including VirtualFileSystem.h in the clangFormat.h indirectly includes <atomic>.
This header is blocked when compiling with /clr.
Patch by Maxime Beaulieu
Differential Revision: http://reviews.llvm.org/D19064
llvm-svn: 266319
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/include/clang/Format/Format.h | 5 | ||||
| -rw-r--r-- | clang/lib/Format/Format.cpp | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/clang/include/clang/Format/Format.h b/clang/include/clang/Format/Format.h index fbb7ab46dfd..2acec268a22 100644 --- a/clang/include/clang/Format/Format.h +++ b/clang/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 <system_error> @@ -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/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 37788df23de..cc11d3df400 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/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" |

