summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaCUDA.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2016-10-10 14:13:55 +0000
committerDaniel Jasper <djasper@google.com>2016-10-10 14:13:55 +0000
commit2b9a6f788b73706b6657080d48debe5a3626a277 (patch)
treea37d641b02ae714c85e5f264341bed1f4f5302eb /lib/Sema/SemaCUDA.cpp
parentd1ea6adb3651e6e20579e0e66ec28b3b831abd53 (diff)
downloadclang-2b9a6f788b73706b6657080d48debe5a3626a277.tar.gz
Revert "P0035R4: Semantic analysis and code generation for C++17 overaligned allocation."
This reverts commit r283722. Breaks: Clang.SemaCUDA.device-var-init.cu Clang.CodeGenCUDA.device-var-init.cu http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/884/ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCUDA.cpp')
-rw-r--r--lib/Sema/SemaCUDA.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/lib/Sema/SemaCUDA.cpp b/lib/Sema/SemaCUDA.cpp
index 827eb02bcd..d6c0606674 100644
--- a/lib/Sema/SemaCUDA.cpp
+++ b/lib/Sema/SemaCUDA.cpp
@@ -158,34 +158,6 @@ Sema::IdentifyCUDAPreference(const FunctionDecl *Caller,
llvm_unreachable("All cases should've been handled by now.");
}
-void Sema::EraseUnwantedCUDAMatches(const FunctionDecl *Caller,
- LookupResult &R) {
- if (R.isSingleResult())
- return;
-
- // Gets the CUDA function preference for a call from Caller to Match.
- auto GetCFP = [&](const NamedDecl *D) {
- if (auto *Callee = dyn_cast<FunctionDecl>(D->getUnderlyingDecl()))
- return IdentifyCUDAPreference(Caller, Callee);
- return CFP_Never;
- };
-
- // Find the best call preference among the functions in R.
- CUDAFunctionPreference BestCFP = GetCFP(*std::max_element(
- R.begin(), R.end(), [&](const NamedDecl *D1, const NamedDecl *D2) {
- return GetCFP(D1) < GetCFP(D2);
- }));
-
- // Erase all functions with lower priority.
- auto Filter = R.makeFilter();
- while (Filter.hasNext()) {
- auto *Callee = dyn_cast<FunctionDecl>(Filter.next()->getUnderlyingDecl());
- if (Callee && GetCFP(Callee) < BestCFP)
- Filter.erase();
- }
- Filter.done();
-}
-
template <typename T>
static void EraseUnwantedCUDAMatchesImpl(
Sema &S, const FunctionDecl *Caller, llvm::SmallVectorImpl<T> &Matches,