Fixes for Clang API change

llvm-svn: 291203
This commit is contained in:
David Blaikie 2017-01-06 01:09:06 +00:00
parent 9c28cb3f65
commit 201f0f5502
2 changed files with 16 additions and 21 deletions

View File

@ -44,25 +44,22 @@ public:
ModularizeUtilities::ModularizeUtilities(std::vector<std::string> &InputPaths,
llvm::StringRef Prefix,
llvm::StringRef ProblemFilesListPath)
: InputFilePaths(InputPaths),
HeaderPrefix(Prefix),
ProblemFilesPath(ProblemFilesListPath),
HasModuleMap(false),
MissingHeaderCount(0),
// Init clang stuff needed for loading the module map and preprocessing.
LangOpts(new LangOptions()), DiagIDs(new DiagnosticIDs()),
DiagnosticOpts(new DiagnosticOptions()),
DC(llvm::errs(), DiagnosticOpts.get()),
Diagnostics(
new DiagnosticsEngine(DiagIDs, DiagnosticOpts.get(), &DC, false)),
TargetOpts(new ModuleMapTargetOptions()),
Target(TargetInfo::CreateTargetInfo(*Diagnostics, TargetOpts)),
FileMgr(new FileManager(FileSystemOpts)),
SourceMgr(new SourceManager(*Diagnostics, *FileMgr, false)),
HeaderSearchOpts(new HeaderSearchOptions()),
HeaderInfo(new HeaderSearch(HeaderSearchOpts, *SourceMgr, *Diagnostics,
*LangOpts, Target.get())) {
}
: InputFilePaths(InputPaths), HeaderPrefix(Prefix),
ProblemFilesPath(ProblemFilesListPath), HasModuleMap(false),
MissingHeaderCount(0),
// Init clang stuff needed for loading the module map and preprocessing.
LangOpts(new LangOptions()), DiagIDs(new DiagnosticIDs()),
DiagnosticOpts(new DiagnosticOptions()),
DC(llvm::errs(), DiagnosticOpts.get()),
Diagnostics(
new DiagnosticsEngine(DiagIDs, DiagnosticOpts.get(), &DC, false)),
TargetOpts(new ModuleMapTargetOptions()),
Target(TargetInfo::CreateTargetInfo(*Diagnostics, TargetOpts)),
FileMgr(new FileManager(FileSystemOpts)),
SourceMgr(new SourceManager(*Diagnostics, *FileMgr, false)),
HeaderInfo(new HeaderSearch(std::make_shared<HeaderSearchOptions>(),
*SourceMgr, *Diagnostics, *LangOpts,
Target.get())) {}
// Create instance of ModularizeUtilities, to simplify setting up
// subordinate objects.

View File

@ -214,8 +214,6 @@ public:
llvm::IntrusiveRefCntPtr<clang::FileManager> FileMgr;
/// Source manager.
llvm::IntrusiveRefCntPtr<clang::SourceManager> SourceMgr;
/// Options controlling the \#include directive.
llvm::IntrusiveRefCntPtr<clang::HeaderSearchOptions> HeaderSearchOpts;
/// Header search manager.
std::unique_ptr<clang::HeaderSearch> HeaderInfo;
// The loaded module map objects.