aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--lib/Frontend/CompilerInvocation.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index c00ffc88a6..fcefad7b3e 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -302,6 +302,7 @@ static const char *getInputKindName(InputKind Kind) {
case IK_ObjC: return "objective-c";
case IK_ObjCXX: return "objective-c++";
case IK_OpenCL: return "cl";
+ case IK_CUDA: return "cuda";
case IK_PreprocessedC: return "cpp-output";
case IK_PreprocessedCXX: return "c++-cpp-output";
case IK_PreprocessedObjC: return "objective-c-cpp-output";
@@ -1113,6 +1114,7 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
.Case("cl", IK_OpenCL)
.Case("c", IK_C)
.Case("cl", IK_OpenCL)
+ .Case("cuda", IK_CUDA)
.Case("c++", IK_CXX)
.Case("objective-c", IK_ObjC)
.Case("objective-c++", IK_ObjCXX)
@@ -1254,6 +1256,9 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
case IK_OpenCL:
LangStd = LangStandard::lang_opencl;
break;
+ case IK_CUDA:
+ LangStd = LangStandard::lang_cuda;
+ break;
case IK_Asm:
case IK_C:
case IK_PreprocessedC:
@@ -1289,6 +1294,9 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
Opts.LaxVectorConversions = 1;
}
+ if (LangStd == LangStandard::lang_cuda)
+ Opts.CUDA = 1;
+
// OpenCL and C++ both have bool, true, false keywords.
Opts.Bool = Opts.OpenCL || Opts.CPlusPlus;