aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-18 00:34:01 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-18 00:34:01 +0000
commitdf91ef3d6c55692a0236f67b6c6b134a3bf84098 (patch)
tree9ca9012e631b6ce8befbfb2cf906fa2f2fd6ea29 /lib/Driver/Driver.cpp
parent250fc9c859fdeed3f200ae911a7e7ea338f38436 (diff)
Preliminary PCH support in the driver
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69410 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r--lib/Driver/Driver.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 5afcefe68d..67e92c21b3 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -45,7 +45,7 @@ Driver::Driver(const char *_Name, const char *_Dir,
Host(0),
CCCIsCXX(false), CCCEcho(false), CCCPrintBindings(false),
CCCGenericGCCName("gcc"), CCCUseClang(true), CCCUseClangCXX(false),
- CCCUseClangCPP(true),
+ CCCUseClangCPP(true), CCCUsePCH(false),
SuppressMissingInputWarning(false)
{
// Only use clang on i386 and x86_64 by default.
@@ -142,6 +142,10 @@ Compilation *Driver::BuildCompilation(int argc, const char **argv) {
} else if (!strcmp(Opt, "clang-cxx")) {
CCCUseClangCXX = true;
+ } else if (!strcmp(Opt, "pch-is-pch")) {
+ CCCUsePCH = true;
+ } else if (!strcmp(Opt, "pch-is-pth")) {
+ CCCUsePCH = false;
} else if (!strcmp(Opt, "no-clang")) {
CCCUseClang = false;
} else if (!strcmp(Opt, "no-clang-cpp")) {
@@ -287,6 +291,10 @@ void Driver::PrintHelp(bool ShowHidden) const {
OptionHelp.push_back(std::make_pair("-ccc-clang-archs",
"Comma separate list of architectures "
"to use the clang compiler for"));
+ OptionHelp.push_back(std::make_pair("-ccc-pch-is-pch",
+ "Use lazy PCH for precompiled headers"));
+ OptionHelp.push_back(std::make_pair("-ccc-pch-is-pth",
+ "Use pretokenized headers for precompiled headers"));
OptionHelp.push_back(std::make_pair("\nDEBUG/DEVELOPMENT OPTIONS:",""));
OptionHelp.push_back(std::make_pair("-ccc-host-triple",