|
@@ -990,6 +990,7 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
|
|
|
.Case("cpp-output", IK_PreprocessedC)
|
|
|
.Case("assembler-with-cpp", IK_Asm)
|
|
|
.Case("c++-cpp-output", IK_PreprocessedCXX)
|
|
|
+ .Case("cuda-cpp-output", IK_PreprocessedCuda)
|
|
|
.Case("objective-c-cpp-output", IK_PreprocessedObjC)
|
|
|
.Case("objc-cpp-output", IK_PreprocessedObjC)
|
|
|
.Case("objective-c++-cpp-output", IK_PreprocessedObjCXX)
|
|
@@ -1193,6 +1194,7 @@ void CompilerInvocation::setLangDefaults(LangOptions &Opts, InputKind IK,
|
|
|
LangStd = LangStandard::lang_opencl;
|
|
|
break;
|
|
|
case IK_CUDA:
|
|
|
+ case IK_PreprocessedCuda:
|
|
|
LangStd = LangStandard::lang_cuda;
|
|
|
break;
|
|
|
case IK_Asm:
|
|
@@ -1245,7 +1247,8 @@ void CompilerInvocation::setLangDefaults(LangOptions &Opts, InputKind IK,
|
|
|
Opts.NativeHalfType = 1;
|
|
|
}
|
|
|
|
|
|
- Opts.CUDA = LangStd == LangStandard::lang_cuda || IK == IK_CUDA;
|
|
|
+ Opts.CUDA = IK == IK_CUDA || IK == IK_PreprocessedCuda ||
|
|
|
+ LangStd == LangStandard::lang_cuda;
|
|
|
|
|
|
// OpenCL and C++ both have bool, true, false keywords.
|
|
|
Opts.Bool = Opts.OpenCL || Opts.CPlusPlus;
|
|
@@ -1360,6 +1363,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
|
|
|
<< A->getAsString(Args) << "OpenCL";
|
|
|
break;
|
|
|
case IK_CUDA:
|
|
|
+ case IK_PreprocessedCuda:
|
|
|
if (!Std.isCPlusPlus())
|
|
|
Diags.Report(diag::err_drv_argument_not_allowed_with)
|
|
|
<< A->getAsString(Args) << "CUDA";
|