[cfe-commits] r145444 - in /cfe/trunk: include/clang/Driver/CC1Options.td include/clang/Frontend/FrontendActions.h include/clang/Frontend/FrontendOptions.h lib/Frontend/CompilerInvocation.cpp lib/Frontend/FrontendActions.cpp lib/FrontendTool/ExecuteCompilerInvocation.cpp test/Modules/diamond.c test/Modules/irgen.c test/Modules/load_failure.c test/Modules/lookup.cpp test/Modules/lookup.m test/Modules/macros.c test/Modules/module-private.cpp test/Modules/objc-categories.m test/Modules/redeclarations.m
Douglas Gregor
dgregor at apple.com
Tue Nov 29 14:42:06 PST 2011
Author: dgregor
Date: Tue Nov 29 16:42:06 2011
New Revision: 145444
URL: http://llvm.org/viewvc/llvm-project?rev=145444&view=rev
Log:
Eliminate the -emit-module option, which emitted a module by parsing a
source file (e.g., a header). Immediately steal this useful option
name for building modules from a module map file.
Modified:
cfe/trunk/include/clang/Driver/CC1Options.td
cfe/trunk/include/clang/Frontend/FrontendActions.h
cfe/trunk/include/clang/Frontend/FrontendOptions.h
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
cfe/trunk/lib/Frontend/FrontendActions.cpp
cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp
cfe/trunk/test/Modules/diamond.c
cfe/trunk/test/Modules/irgen.c
cfe/trunk/test/Modules/load_failure.c
cfe/trunk/test/Modules/lookup.cpp
cfe/trunk/test/Modules/lookup.m
cfe/trunk/test/Modules/macros.c
cfe/trunk/test/Modules/module-private.cpp
cfe/trunk/test/Modules/objc-categories.m
cfe/trunk/test/Modules/redeclarations.m
Modified: cfe/trunk/include/clang/Driver/CC1Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=145444&r1=145443&r2=145444&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CC1Options.td (original)
+++ cfe/trunk/include/clang/Driver/CC1Options.td Tue Nov 29 16:42:06 2011
@@ -378,9 +378,7 @@
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">,
Modified: cfe/trunk/include/clang/Frontend/FrontendActions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/FrontendActions.h?rev=145444&r1=145443&r2=145444&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/FrontendActions.h (original)
+++ cfe/trunk/include/clang/Frontend/FrontendActions.h Tue Nov 29 16:42:06 2011
@@ -80,9 +80,6 @@
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.
///
Modified: cfe/trunk/include/clang/Frontend/FrontendOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/FrontendOptions.h?rev=145444&r1=145443&r2=145444&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/FrontendOptions.h (original)
+++ cfe/trunk/include/clang/Frontend/FrontendOptions.h Tue Nov 29 16:42:06 2011
@@ -35,7 +35,6 @@
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.
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=145444&r1=145443&r2=145444&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Tue Nov 29 16:42:06 2011
@@ -409,7 +409,6 @@
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";
@@ -1274,8 +1273,6 @@
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:
Modified: cfe/trunk/lib/Frontend/FrontendActions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/FrontendActions.cpp?rev=145444&r1=145443&r2=145444&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/FrontendActions.cpp (original)
+++ cfe/trunk/lib/Frontend/FrontendActions.cpp Tue Nov 29 16:42:06 2011
@@ -86,7 +86,7 @@
if (!CI.getFrontendOpts().RelocatablePCH)
Sysroot.clear();
- return new PCHGenerator(CI.getPreprocessor(), OutputFile, MakeModule,
+ return new PCHGenerator(CI.getPreprocessor(), OutputFile, /*Module=*/false,
Sysroot, OS);
}
Modified: cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp?rev=145444&r1=145443&r2=145444&view=diff
==============================================================================
--- cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp (original)
+++ cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp Tue Nov 29 16:42:06 2011
@@ -49,9 +49,8 @@
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();
Modified: cfe/trunk/test/Modules/diamond.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/diamond.c?rev=145444&r1=145443&r2=145444&view=diff
==============================================================================
--- cfe/trunk/test/Modules/diamond.c (original)
+++ cfe/trunk/test/Modules/diamond.c Tue Nov 29 16:42:06 2011
@@ -21,8 +21,8 @@
}
// 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
Modified: cfe/trunk/test/Modules/irgen.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/irgen.c?rev=145444&r1=145443&r2=145444&view=diff
==============================================================================
--- cfe/trunk/test/Modules/irgen.c (original)
+++ cfe/trunk/test/Modules/irgen.c Tue Nov 29 16:42:06 2011
@@ -1,5 +1,5 @@
// 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;
Modified: cfe/trunk/test/Modules/load_failure.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/load_failure.c?rev=145444&r1=145443&r2=145444&view=diff
==============================================================================
--- cfe/trunk/test/Modules/load_failure.c (original)
+++ cfe/trunk/test/Modules/load_failure.c Tue Nov 29 16:42:06 2011
@@ -7,7 +7,7 @@
#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
Modified: cfe/trunk/test/Modules/lookup.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/lookup.cpp?rev=145444&r1=145443&r2=145444&view=diff
==============================================================================
--- cfe/trunk/test/Modules/lookup.cpp (original)
+++ cfe/trunk/test/Modules/lookup.cpp Tue Nov 29 16:42:06 2011
@@ -15,8 +15,8 @@
}
// 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
Modified: cfe/trunk/test/Modules/lookup.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/lookup.m?rev=145444&r1=145443&r2=145444&view=diff
==============================================================================
--- cfe/trunk/test/Modules/lookup.m (original)
+++ cfe/trunk/test/Modules/lookup.m Tue Nov 29 16:42:06 2011
@@ -9,8 +9,8 @@
}
// 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
Modified: cfe/trunk/test/Modules/macros.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/macros.c?rev=145444&r1=145443&r2=145444&view=diff
==============================================================================
--- cfe/trunk/test/Modules/macros.c (original)
+++ cfe/trunk/test/Modules/macros.c Tue Nov 29 16:42:06 2011
@@ -1,5 +1,5 @@
// 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
Modified: cfe/trunk/test/Modules/module-private.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/module-private.cpp?rev=145444&r1=145443&r2=145444&view=diff
==============================================================================
--- cfe/trunk/test/Modules/module-private.cpp (original)
+++ cfe/trunk/test/Modules/module-private.cpp Tue Nov 29 16:42:06 2011
@@ -1,6 +1,6 @@
// 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;
Modified: cfe/trunk/test/Modules/objc-categories.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/objc-categories.m?rev=145444&r1=145443&r2=145444&view=diff
==============================================================================
--- cfe/trunk/test/Modules/objc-categories.m (original)
+++ cfe/trunk/test/Modules/objc-categories.m Tue Nov 29 16:42:06 2011
@@ -1,8 +1,8 @@
// 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;
Modified: cfe/trunk/test/Modules/redeclarations.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/redeclarations.m?rev=145444&r1=145443&r2=145444&view=diff
==============================================================================
--- cfe/trunk/test/Modules/redeclarations.m (original)
+++ cfe/trunk/test/Modules/redeclarations.m Tue Nov 29 16:42:06 2011
@@ -5,7 +5,7 @@
@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
More information about the cfe-commits
mailing list