def print_decl_contexts : Flag<"-print-decl-contexts">,
HelpText<"Print DeclContexts and their Decls">;
def emit_module : Flag<"-emit-module">,
- HelpText<"Generate pre-compiled module file">;
-def emit_module_from_map : Flag<"-emit-module-from-map">,
- HelpText<"Generate pre-compiled module file from module map">;
+ HelpText<"Generate pre-compiled module file from a module map">;
def emit_pth : Flag<"-emit-pth">,
HelpText<"Generate pre-tokenized header file">;
def emit_pch : Flag<"-emit-pch">,
virtual bool hasASTFileSupport() const { return false; }
public:
- /// \brief Create a new action
- explicit GeneratePCHAction(bool MakeModule) : MakeModule(MakeModule) { }
-
/// \brief Compute the AST consumer arguments that will be used to
/// create the PCHGenerator instance returned by CreateASTConsumer.
///
EmitObj, ///< Emit a .o file.
FixIt, ///< Parse and apply any fixits to the source.
GenerateModule, ///< Generate pre-compiled module.
- GenerateModuleFromMap, ///< Generate pre-compiled module from module map.
GeneratePCH, ///< Generate pre-compiled header.
GeneratePTH, ///< Generate pre-tokenized header.
InitOnly, ///< Only execute frontend initialization.
case frontend::EmitObj: return "-emit-obj";
case frontend::FixIt: return "-fixit";
case frontend::GenerateModule: return "-emit-module";
- case frontend::GenerateModuleFromMap: return "-emit-module-from-map";
case frontend::GeneratePCH: return "-emit-pch";
case frontend::GeneratePTH: return "-emit-pth";
case frontend::InitOnly: return "-init-only";
Opts.ProgramAction = frontend::FixIt; break;
case OPT_emit_module:
Opts.ProgramAction = frontend::GenerateModule; break;
- case OPT_emit_module_from_map:
- Opts.ProgramAction = frontend::GenerateModuleFromMap; break;
case OPT_emit_pch:
Opts.ProgramAction = frontend::GeneratePCH; break;
case OPT_emit_pth:
if (!CI.getFrontendOpts().RelocatablePCH)
Sysroot.clear();
- return new PCHGenerator(CI.getPreprocessor(), OutputFile, MakeModule,
+ return new PCHGenerator(CI.getPreprocessor(), OutputFile, /*Module=*/false,
Sysroot, OS);
}
case EmitCodeGenOnly: return new EmitCodeGenOnlyAction();
case EmitObj: return new EmitObjAction();
case FixIt: return new FixItAction();
- case GenerateModule: return new GeneratePCHAction(true);
- case GenerateModuleFromMap: return new GenerateModuleAction;
- case GeneratePCH: return new GeneratePCHAction(false);
+ case GenerateModule: return new GenerateModuleAction;
+ case GeneratePCH: return new GeneratePCHAction;
case GeneratePTH: return new GeneratePTHAction();
case InitOnly: return new InitOnlyAction();
case ParseSyntaxOnly: return new SyntaxOnlyAction();
}
// RUN: rm -rf %t
-// RUN: %clang_cc1 -emit-module-from-map -fmodule-cache-path %t -fmodule-name=diamond_top %S/Inputs/module.map
-// RUN: %clang_cc1 -emit-module-from-map -fmodule-cache-path %t -fmodule-name=diamond_left %S/Inputs/module.map
-// RUN: %clang_cc1 -emit-module-from-map -fmodule-cache-path %t -fmodule-name=diamond_right %S/Inputs/module.map
-// RUN: %clang_cc1 -emit-module-from-map -fmodule-cache-path %t -fmodule-name=diamond_bottom %S/Inputs/module.map
+// RUN: %clang_cc1 -emit-module -fmodule-cache-path %t -fmodule-name=diamond_top %S/Inputs/module.map
+// RUN: %clang_cc1 -emit-module -fmodule-cache-path %t -fmodule-name=diamond_left %S/Inputs/module.map
+// RUN: %clang_cc1 -emit-module -fmodule-cache-path %t -fmodule-name=diamond_right %S/Inputs/module.map
+// RUN: %clang_cc1 -emit-module -fmodule-cache-path %t -fmodule-name=diamond_bottom %S/Inputs/module.map
// RUN: %clang_cc1 -fmodule-cache-path %t %s -verify
// RUN: rm -rf %t
-// RUN: %clang_cc1 -fmodule-cache-path %t -emit-module-from-map -fmodule-name=irgen -triple x86_64-apple-darwin10 %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodule-cache-path %t -emit-module -fmodule-name=irgen -triple x86_64-apple-darwin10 %S/Inputs/module.map
// RUN: %clang_cc1 -fmodule-cache-path %t -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
__import_module__ irgen;
#endif
// RUN: rm -rf %t
-// RUN: %clang_cc1 -x c++ -fmodule-cache-path %t -fdisable-module-hash -emit-module-from-map -fmodule-name=load_failure %S/Inputs/module.map
+// RUN: %clang_cc1 -x c++ -fmodule-cache-path %t -fdisable-module-hash -emit-module -fmodule-name=load_failure %S/Inputs/module.map
// RUN: %clang_cc1 -fmodule-cache-path %t -fdisable-module-hash %s -DNONEXISTENT 2>&1 | FileCheck -check-prefix=CHECK-NONEXISTENT %s
// CHECK-NONEXISTENT: load_failure.c:2:19: fatal error: module 'load_nonexistent' not found
}
// RUN: rm -rf %t
-// RUN: %clang_cc1 -emit-module-from-map -fmodule-cache-path %t -fmodule-name=lookup_left_cxx -x c++ %S/Inputs/module.map -verify
-// RUN: %clang_cc1 -emit-module-from-map -fmodule-cache-path %t -fmodule-name=lookup_right_cxx -x c++ %S/Inputs/module.map -verify
+// RUN: %clang_cc1 -emit-module -fmodule-cache-path %t -fmodule-name=lookup_left_cxx -x c++ %S/Inputs/module.map -verify
+// RUN: %clang_cc1 -emit-module -fmodule-cache-path %t -fmodule-name=lookup_right_cxx -x c++ %S/Inputs/module.map -verify
// RUN: %clang_cc1 -x c++ -fmodule-cache-path %t %s -verify
// RUN: %clang_cc1 -ast-print -x c++ -fmodule-cache-path %t %s | FileCheck -check-prefix=CHECK-PRINT %s
}
// RUN: rm -rf %t
-// RUN: %clang_cc1 -fmodule-cache-path %t -emit-module-from-map -x objective-c -fmodule-name=lookup_left_objc %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodule-cache-path %t -emit-module-from-map -x objective-c -fmodule-name=lookup_right_objc %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodule-cache-path %t -emit-module -x objective-c -fmodule-name=lookup_left_objc %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodule-cache-path %t -emit-module -x objective-c -fmodule-name=lookup_right_objc %S/Inputs/module.map
// RUN: %clang_cc1 -x objective-c -fmodule-cache-path %t -verify %s
// RUN: %clang_cc1 -ast-print -x objective-c -fmodule-cache-path %t %s | FileCheck -check-prefix=CHECK-PRINT %s
// RUN: rm -rf %t
-// RUN: %clang_cc1 -emit-module-from-map -fmodule-cache-path %t -fmodule-name=macros %S/Inputs/module.map
+// RUN: %clang_cc1 -emit-module -fmodule-cache-path %t -fmodule-name=macros %S/Inputs/module.map
// RUN: %clang_cc1 -verify -fmodule-cache-path %t %s
// RUN: %clang_cc1 -E -fmodule-cache-path %t %s | FileCheck -check-prefix CHECK-PREPROCESSED %s
// RUN: rm -rf %t
-// RUN: %clang_cc1 -fmodule-cache-path %t -fmodule-name=module_private_left -x c++ -emit-module-from-map %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodule-cache-path %t -fmodule-name=module_private_right -x c++ -emit-module-from-map %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodule-cache-path %t -fmodule-name=module_private_left -x c++ -emit-module %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodule-cache-path %t -fmodule-name=module_private_right -x c++ -emit-module %S/Inputs/module.map
// RUN: %clang_cc1 -fmodule-cache-path %t %s -verify
__import_module__ module_private_left;
// RUN: rm -rf %t
-// RUN: %clang_cc1 -fmodule-cache-path %t -x objective-c -fmodule-name=category_top -emit-module-from-map %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodule-cache-path %t -x objective-c -fmodule-name=category_left -emit-module-from-map %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodule-cache-path %t -x objective-c -fmodule-name=category_right -emit-module-from-map %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodule-cache-path %t -x objective-c -fmodule-name=category_bottom -emit-module-from-map %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodule-cache-path %t -x objective-c -fmodule-name=category_top -emit-module %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodule-cache-path %t -x objective-c -fmodule-name=category_left -emit-module %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodule-cache-path %t -x objective-c -fmodule-name=category_right -emit-module %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodule-cache-path %t -x objective-c -fmodule-name=category_bottom -emit-module %S/Inputs/module.map
// RUN: %clang_cc1 -fmodule-cache-path %t %s -verify
__import_module__ category_bottom;
@end
// RUN: rm -rf %t
-// RUN: %clang_cc1 -x objective-c -fmodule-cache-path %t -emit-module-from-map -fmodule-name=redeclarations_left %S/Inputs/module.map
-// RUN: %clang_cc1 -x objective-c -fmodule-cache-path %t -emit-module-from-map -fmodule-name=redeclarations_right %S/Inputs/module.map
+// RUN: %clang_cc1 -x objective-c -fmodule-cache-path %t -emit-module -fmodule-name=redeclarations_left %S/Inputs/module.map
+// RUN: %clang_cc1 -x objective-c -fmodule-cache-path %t -emit-module -fmodule-name=redeclarations_right %S/Inputs/module.map
// RUN: %clang_cc1 -fmodule-cache-path %t %s -verify