Skip to content

Commit c98fc7c

Browse files
[SYCL] Remove old SYCL 1.2 exception subclasses (#14546)
Codebase has been cleaned up from using them in earlier individual PRs. Now that they aren't used final removal is trivial.
1 parent 36543a1 commit c98fc7c

File tree

2 files changed

+0
-53
lines changed

2 files changed

+0
-53
lines changed

sycl/include/sycl/exception.hpp

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -150,53 +150,6 @@ class __SYCL_EXPORT exception : public virtual std::exception {
150150
pi_int32 pi_err);
151151
};
152152

153-
class __SYCL2020_DEPRECATED(
154-
"use sycl::exception with sycl::errc::runtime instead.") runtime_error
155-
: public exception {
156-
public:
157-
runtime_error() : exception(make_error_code(errc::runtime)) {}
158-
159-
runtime_error(const char *Msg, pi_int32 Err)
160-
: runtime_error(std::string(Msg), Err) {}
161-
162-
runtime_error(const std::string &Msg, pi_int32 Err)
163-
: exception(make_error_code(errc::runtime), Msg, Err) {}
164-
165-
runtime_error(std::error_code Ec, const std::string &Msg,
166-
const pi_int32 PIErr)
167-
: exception(Ec, Msg, PIErr) {}
168-
169-
protected:
170-
runtime_error(std::error_code Ec) : exception(Ec) {}
171-
};
172-
173-
class __SYCL2020_DEPRECATED(
174-
"use sycl::exception with sycl::errc::nd_range instead.") nd_range_error
175-
: public runtime_error {
176-
public:
177-
nd_range_error() : runtime_error(make_error_code(errc::nd_range)) {}
178-
179-
nd_range_error(const char *Msg, pi_int32 Err)
180-
: nd_range_error(std::string(Msg), Err) {}
181-
182-
nd_range_error(const std::string &Msg, pi_int32 Err)
183-
: runtime_error(make_error_code(errc::nd_range), Msg, Err) {}
184-
};
185-
186-
class __SYCL2020_DEPRECATED(
187-
"use sycl::exception with a sycl::errc enum value instead.")
188-
invalid_parameter_error : public runtime_error {
189-
public:
190-
invalid_parameter_error()
191-
: runtime_error(make_error_code(errc::kernel_argument)) {}
192-
193-
invalid_parameter_error(const char *Msg, pi_int32 Err)
194-
: invalid_parameter_error(std::string(Msg), Err) {}
195-
196-
invalid_parameter_error(const std::string &Msg, pi_int32 Err)
197-
: runtime_error(make_error_code(errc::kernel_argument), Msg, Err) {}
198-
};
199-
200153
} // namespace _V1
201154
} // namespace sycl
202155

sycl/test/warnings/sycl_2020_deprecations.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,6 @@ int main() {
8585
// expected-warning@+1 {{'get_size' is deprecated: get_size() is deprecated, please use byte_size() instead}}
8686
size_t VecGetSize = Vec.get_size();
8787

88-
// expected-warning@+1 {{'runtime_error' is deprecated: use sycl::exception with sycl::errc::runtime instead.}}
89-
sycl::runtime_error re;
90-
// expected-warning@+1 {{'nd_range_error' is deprecated: use sycl::exception with sycl::errc::nd_range instead.}}
91-
sycl::nd_range_error ne;
92-
// expected-warning@+1 {{'invalid_parameter_error' is deprecated: use sycl::exception with a sycl::errc enum value instead.}}
93-
sycl::invalid_parameter_error ipe;
9488
// expected-warning@+1{{'exception' is deprecated: The version of an exception constructor which takes no arguments is deprecated.}}
9589
sycl::exception ex;
9690

0 commit comments

Comments
 (0)