diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2010-12-01 03:15:20 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2010-12-01 03:15:20 +0000 |
commit | 62089b82bb63d8c54b698dc994d0b76937efa178 (patch) | |
tree | 8bbe6951e093350e36daf2147dccfad77c3d5bcb /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 07525a07261b1217107df7e374284003f8013f57 (diff) | |
download | bcm5719-llvm-62089b82bb63d8c54b698dc994d0b76937efa178.tar.gz bcm5719-llvm-62089b82bb63d8c54b698dc994d0b76937efa178.zip |
Driver, Frontend: add CUDA language support
llvm-svn: 120544
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index c00ffc88a6d..fcefad7b3e3 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/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; |