[clang-tidy] Don't error on MS-style inline assembly.
To get MS-style inline assembly, we need to link in the various
backends. Some other clang tools already do this, and this issue
has been raised with clang-tidy several times, indicating there
is sufficient desire to make this work.
Differential Revision: https://reviews.llvm.org/D38549
llvm-svn: 316246
diff --git a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
index a57fde8..79c0d0b 100644
--- a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
+++ b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
@@ -18,6 +18,7 @@
#include "../ClangTidy.h"
#include "clang/Tooling/CommonOptionsParser.h"
#include "llvm/Support/Process.h"
+#include "llvm/Support/TargetSelect.h"
using namespace clang::ast_matchers;
using namespace clang::driver;
@@ -403,6 +404,10 @@
ProfileData Profile;
+ llvm::InitializeAllTargetInfos();
+ llvm::InitializeAllTargetMCs();
+ llvm::InitializeAllAsmParsers();
+
ClangTidyContext Context(std::move(OwningOptionsProvider));
runClangTidy(Context, OptionsParser.getCompilations(), PathList,
EnableCheckProfile ? &Profile : nullptr);