Skip to content

Commit e22b3ce

Browse files
authored
[executorch] Suppress wdeprecated warnings on tensor_layout.h and named_data_map.h
Differential Revision: D69145438 Pull Request resolved: #8201
1 parent 97417de commit e22b3ce

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

runtime/core/named_data_map.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
*/
88

99
#pragma once
10+
// Disable -Wdeprecated-declarations, as some builds use 'Werror'.
11+
#pragma GCC diagnostic push
12+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1013

1114
#include <executorch/runtime/core/exec_aten/exec_aten.h>
1215
#include <executorch/runtime/core/freeable_buffer.h>
@@ -75,3 +78,5 @@ class ET_EXPERIMENTAL NamedDataMap {
7578

7679
} // namespace runtime
7780
} // namespace executorch
81+
82+
#pragma GCC diagnostic pop

runtime/executor/method.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
*/
88

99
#pragma once
10+
// Disable -Wdeprecated-declarations, as some builds use 'Werror'.
11+
#pragma GCC diagnostic push
12+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1013

1114
#include <executorch/runtime/core/evalue.h>
1215
#include <executorch/runtime/core/event_tracer.h>
@@ -358,3 +361,5 @@ namespace executor {
358361
using ::executorch::runtime::Method;
359362
} // namespace executor
360363
} // namespace torch
364+
365+
#pragma GCC diagnostic pop

runtime/executor/program.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
*/
88

99
#pragma once
10+
// Disable -Wdeprecated-declarations, as some builds use 'Werror'.
11+
#pragma GCC diagnostic push
12+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1013

1114
#include <cinttypes>
1215
#include <cstdint>
@@ -301,3 +304,5 @@ namespace executor {
301304
using ::executorch::runtime::Program;
302305
} // namespace executor
303306
} // namespace torch
307+
308+
#pragma GCC diagnostic pop

0 commit comments

Comments
 (0)