diff options
Diffstat (limited to 'clang/lib/Frontend/FrontendActions.cpp')
-rw-r--r-- | clang/lib/Frontend/FrontendActions.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp index babaa2d..88ff7e0 100644 --- a/clang/lib/Frontend/FrontendActions.cpp +++ b/clang/lib/Frontend/FrontendActions.cpp @@ -596,6 +596,13 @@ namespace { }; } +bool DumpModuleInfoAction::BeginInvocation(CompilerInstance &CI) { + // The Object file reader also supports raw ast files and there is no point in + // being strict about the module file format in -module-file-info mode. + CI.getHeaderSearchOpts().ModuleFormat = "obj"; + return true; +} + void DumpModuleInfoAction::ExecuteAction() { // Set up the output file. std::unique_ptr<llvm::raw_fd_ostream> OutFile; @@ -608,6 +615,7 @@ void DumpModuleInfoAction::ExecuteAction() { llvm::raw_ostream &Out = OutFile.get()? *OutFile.get() : llvm::outs(); Out << "Information for module file '" << getCurrentFile() << "':\n"; + Preprocessor &PP = getCompilerInstance().getPreprocessor(); DumpModuleInfoListener Listener(Out); HeaderSearchOptions &HSOpts = |