add support for -x c++-header, update comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63924 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2009-02-06 06:19:20 +00:00
Родитель 59076ab80b
Коммит c76d807565
1 изменённых файлов: 25 добавлений и 20 удалений

Просмотреть файл

@ -267,6 +267,7 @@ enum LangKind {
langkind_c_pch, langkind_c_pch,
langkind_cxx, langkind_cxx,
langkind_cxx_cpp, langkind_cxx_cpp,
langkind_cxx_pch,
langkind_objc, langkind_objc,
langkind_objc_cpp, langkind_objc_cpp,
langkind_objc_pch, langkind_objc_pch,
@ -276,9 +277,7 @@ enum LangKind {
}; };
/* TODO: GCC also accepts: /* TODO: GCC also accepts:
c-header c++-header objective-c-header objective-c++-header assembler, ada, f77*, ratfor (!), f95, java, treelang
assembler
ada, f77*, ratfor (!), f95, java, treelang
*/ */
static llvm::cl::opt<LangKind> static llvm::cl::opt<LangKind>
BaseLang("x", llvm::cl::desc("Base language to compile"), BaseLang("x", llvm::cl::desc("Base language to compile"),
@ -301,6 +300,8 @@ BaseLang("x", llvm::cl::desc("Base language to compile"),
"Precompiled C header"), "Precompiled C header"),
clEnumValN(langkind_objc_pch, "objective-c-header", clEnumValN(langkind_objc_pch, "objective-c-header",
"Precompiled Objective-C header"), "Precompiled Objective-C header"),
clEnumValN(langkind_cxx_pch, "c++-header",
"Precompiled C++ header"),
clEnumValN(langkind_objcxx_pch, "objective-c++-header", clEnumValN(langkind_objcxx_pch, "objective-c++-header",
"Precompiled Objective-C++ header"), "Precompiled Objective-C++ header"),
clEnumValEnd)); clEnumValEnd));
@ -386,6 +387,10 @@ static bool InitializeLangOptions(LangOptions &Options, LangKind LK){
LK = langkind_objc; LK = langkind_objc;
PCH = true; PCH = true;
break; break;
case langkind_cxx_pch:
LK = langkind_cxx;
PCH = true;
break;
case langkind_objcxx_pch: case langkind_objcxx_pch:
LK = langkind_objcxx; LK = langkind_objcxx;
PCH = true; PCH = true;