summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorEli Bendersky <eliben@google.com>2014-09-03 15:27:03 +0000
committerEli Bendersky <eliben@google.com>2014-09-03 15:27:03 +0000
commit7325e56c109bd9741650a388e9f6de8d32b241e1 (patch)
treebde7904a303d7c7d9678839c5abf9ad5df05b7bf /clang/lib/Sema/SemaDeclCXX.cpp
parentc4e0c1075b87e345f6dbb2d237be8b2ea1935d1b (diff)
downloadbcm5719-llvm-7325e56c109bd9741650a388e9f6de8d32b241e1.tar.gz
bcm5719-llvm-7325e56c109bd9741650a388e9f6de8d32b241e1.zip
Split off CUDA-specific Sema parts to a new file
In line with SemaOpenMP.cpp, etc. CUDA-specific semantic analysis code goes into a separate file. This is in anticipation of adding extra functionality here in the near future. No change in functionality. Review: http://reviews.llvm.org/D5160 llvm-svn: 217043
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp40
1 files changed, 0 insertions, 40 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 4ca12cf8bf1..5da65461059 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -13101,46 +13101,6 @@ Sema::checkExceptionSpecification(ExceptionSpecificationType EST,
}
}
-/// IdentifyCUDATarget - Determine the CUDA compilation target for this function
-Sema::CUDAFunctionTarget Sema::IdentifyCUDATarget(const FunctionDecl *D) {
- // Implicitly declared functions (e.g. copy constructors) are
- // __host__ __device__
- if (D->isImplicit())
- return CFT_HostDevice;
-
- if (D->hasAttr<CUDAGlobalAttr>())
- return CFT_Global;
-
- if (D->hasAttr<CUDADeviceAttr>()) {
- if (D->hasAttr<CUDAHostAttr>())
- return CFT_HostDevice;
- return CFT_Device;
- }
-
- return CFT_Host;
-}
-
-bool Sema::CheckCUDATarget(CUDAFunctionTarget CallerTarget,
- CUDAFunctionTarget CalleeTarget) {
- // CUDA B.1.1 "The __device__ qualifier declares a function that is...
- // Callable from the device only."
- if (CallerTarget == CFT_Host && CalleeTarget == CFT_Device)
- return true;
-
- // CUDA B.1.2 "The __global__ qualifier declares a function that is...
- // Callable from the host only."
- // CUDA B.1.3 "The __host__ qualifier declares a function that is...
- // Callable from the host only."
- if ((CallerTarget == CFT_Device || CallerTarget == CFT_Global) &&
- (CalleeTarget == CFT_Host || CalleeTarget == CFT_Global))
- return true;
-
- if (CallerTarget == CFT_HostDevice && CalleeTarget != CFT_HostDevice)
- return true;
-
- return false;
-}
-
/// HandleMSProperty - Analyze a __delcspec(property) field of a C++ class.
///
MSPropertyDecl *Sema::HandleMSProperty(Scope *S, RecordDecl *Record,
OpenPOWER on IntegriCloud