Cleaning up unused TF_TensorHandleList, now that captures are not exposed on the C API.

PiperOrigin-RevId: 324893440
Change-Id: Ie89e64894e19af2e72a187bc07065595d0704925
diff --git a/tensorflow/c/experimental/saved_model/internal/BUILD b/tensorflow/c/experimental/saved_model/internal/BUILD
index 60ca013..323298c 100644
--- a/tensorflow/c/experimental/saved_model/internal/BUILD
+++ b/tensorflow/c/experimental/saved_model/internal/BUILD
@@ -38,8 +38,6 @@
         ":concrete_function_type",
         ":function_metadata",
         ":function_metadata_type",
-        ":tensorhandle_list",
-        ":tensorhandle_list_type",
         "//tensorflow/c:c_api_macros",
         "//tensorflow/c:tf_status_internal",
         "//tensorflow/c/eager:abstract_tensor_handle",
@@ -167,38 +165,6 @@
     ],
 )
 
-cc_library(
-    name = "tensorhandle_list",
-    srcs = [
-        "tensorhandle_list.cc",
-    ],
-    hdrs = [
-        "//tensorflow/c/experimental/saved_model/public:tensorhandle_list.h",
-    ],
-    copts = tf_copts(),
-    visibility = [
-        "//tensorflow/c/experimental/saved_model/public:__pkg__",
-    ],
-    deps = [
-        ":tensorhandle_list_type",
-        "//tensorflow/c:c_api_macros",
-        "//tensorflow/c/eager:c_api",
-        "//tensorflow/c/eager:immediate_execution_tensor_handle",
-        "//tensorflow/c/eager:tfe_tensorhandle_internal",
-    ],
-)
-
-cc_library(
-    name = "tensorhandle_list_type",
-    hdrs = [
-        "tensorhandle_list_type.h",
-    ],
-    deps = [
-        "//tensorflow/c:conversion_macros",
-        "//tensorflow/c/eager:immediate_execution_tensor_handle",
-    ],
-)
-
 tf_cc_test(
     name = "saved_model_api_test",
     size = "small",
@@ -216,7 +182,6 @@
         "//tensorflow/c/eager:c_api_test_util",
         "//tensorflow/c/experimental/saved_model/public:concrete_function",
         "//tensorflow/c/experimental/saved_model/public:saved_model_api",
-        "//tensorflow/c/experimental/saved_model/public:tensorhandle_list",
         "//tensorflow/core:lib",
         "//tensorflow/core:test",
         "//tensorflow/core:test_main",
diff --git a/tensorflow/c/experimental/saved_model/internal/concrete_function.cc b/tensorflow/c/experimental/saved_model/internal/concrete_function.cc
index 9f421a7..65c6eca 100644
--- a/tensorflow/c/experimental/saved_model/internal/concrete_function.cc
+++ b/tensorflow/c/experimental/saved_model/internal/concrete_function.cc
@@ -24,7 +24,6 @@
 #include "tensorflow/c/experimental/saved_model/core/function_metadata.h"
 #include "tensorflow/c/experimental/saved_model/internal/concrete_function_type.h"
 #include "tensorflow/c/experimental/saved_model/internal/function_metadata_type.h"
-#include "tensorflow/c/experimental/saved_model/internal/tensorhandle_list_type.h"
 #include "tensorflow/c/tf_status_internal.h"
 #include "tensorflow/core/platform/status.h"
 
diff --git a/tensorflow/c/experimental/saved_model/internal/saved_model_api_test.cc b/tensorflow/c/experimental/saved_model/internal/saved_model_api_test.cc
index 10b5677..e58b232 100644
--- a/tensorflow/c/experimental/saved_model/internal/saved_model_api_test.cc
+++ b/tensorflow/c/experimental/saved_model/internal/saved_model_api_test.cc
@@ -22,7 +22,6 @@
 #include "tensorflow/c/eager/c_api_experimental.h"
 #include "tensorflow/c/eager/c_api_test_util.h"
 #include "tensorflow/c/experimental/saved_model/public/concrete_function.h"
-#include "tensorflow/c/experimental/saved_model/public/tensorhandle_list.h"
 #include "tensorflow/c/tf_status.h"
 #include "tensorflow/c/tf_tensor.h"
 #include "tensorflow/core/lib/io/path.h"
diff --git a/tensorflow/c/experimental/saved_model/internal/tensorhandle_list.cc b/tensorflow/c/experimental/saved_model/internal/tensorhandle_list.cc
deleted file mode 100644
index c8f00c1..0000000
--- a/tensorflow/c/experimental/saved_model/internal/tensorhandle_list.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-==============================================================================*/
-
-#include "tensorflow/c/experimental/saved_model/public/tensorhandle_list.h"
-
-#include <stddef.h>
-
-#include "tensorflow/c/eager/immediate_execution_tensor_handle.h"
-#include "tensorflow/c/eager/tfe_tensorhandle_internal.h"
-#include "tensorflow/c/experimental/saved_model/internal/tensorhandle_list_type.h"
-
-extern "C" {
-
-size_t TF_TensorHandleListSize(const TF_TensorHandleList* list) {
-  return tensorflow::unwrap(list)->size();
-}
-
-TFE_TensorHandle* TF_TensorHandleListGet(const TF_TensorHandleList* list,
-                                         int i) {
-  return tensorflow::wrap((*tensorflow::unwrap(list))[i]);
-}
-
-
-}  // end extern "C"
diff --git a/tensorflow/c/experimental/saved_model/internal/tensorhandle_list_type.h b/tensorflow/c/experimental/saved_model/internal/tensorhandle_list_type.h
deleted file mode 100644
index 566417d..0000000
--- a/tensorflow/c/experimental/saved_model/internal/tensorhandle_list_type.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-==============================================================================*/
-
-#ifndef TENSORFLOW_C_EXPERIMENTAL_SAVED_MODEL_INTERNAL_CONCRETE_FUNCTION_LIST_TYPE_H_
-#define TENSORFLOW_C_EXPERIMENTAL_SAVED_MODEL_INTERNAL_CONCRETE_FUNCTION_LIST_TYPE_H_
-
-#include <vector>
-
-#include "tensorflow/c/conversion_macros.h"
-#include "tensorflow/c/eager/immediate_execution_tensor_handle.h"
-
-// Internal structures used by the SavedModel C API. These are likely to
-// change and should not be depended on.
-
-typedef struct TF_TensorHandleList TF_TensorHandleList;
-
-namespace tensorflow {
-
-DEFINE_CONVERSION_FUNCTIONS(
-    std::vector<tensorflow::ImmediateExecutionTensorHandle*>,
-    TF_TensorHandleList)
-
-}  // namespace tensorflow
-
-#endif  // TENSORFLOW_C_EXPERIMENTAL_SAVED_MODEL_INTERNAL_CONCRETE_FUNCTION_LIST_TYPE_H_
diff --git a/tensorflow/c/experimental/saved_model/public/BUILD b/tensorflow/c/experimental/saved_model/public/BUILD
index 0cfa0a2..af65e05 100644
--- a/tensorflow/c/experimental/saved_model/public/BUILD
+++ b/tensorflow/c/experimental/saved_model/public/BUILD
@@ -24,7 +24,6 @@
         "concrete_function_list.h",
         "function_metadata.h",
         "saved_model_api.h",
-        "tensorhandle_list.h",
     ],
     visibility = ["//tensorflow/c/experimental/saved_model/internal:__pkg__"],
 )
@@ -40,7 +39,6 @@
         ":concrete_function_list",
         ":function_metadata",
         ":saved_model_api",
-        ":tensorhandle_list",
     ],
 )
 
@@ -63,8 +61,3 @@
     name = "saved_model_api",
     actual = "//tensorflow/c/experimental/saved_model/internal:saved_model_api",
 )
-
-alias(
-    name = "tensorhandle_list",
-    actual = "//tensorflow/c/experimental/saved_model/internal:tensorhandle_list",
-)
diff --git a/tensorflow/c/experimental/saved_model/public/c_saved_model_api.h b/tensorflow/c/experimental/saved_model/public/c_saved_model_api.h
index aae95a5..30f533f 100644
--- a/tensorflow/c/experimental/saved_model/public/c_saved_model_api.h
+++ b/tensorflow/c/experimental/saved_model/public/c_saved_model_api.h
@@ -21,7 +21,6 @@
 #include "tensorflow/c/experimental/saved_model/public/concrete_function_list.h"
 #include "tensorflow/c/experimental/saved_model/public/function_metadata.h"
 #include "tensorflow/c/experimental/saved_model/public/saved_model_api.h"
-#include "tensorflow/c/experimental/saved_model/public/tensorhandle_list.h"
 // IWYU pragma: end_exports
 
 #endif  // TENSORFLOW_C_EXPERIMENTAL_SAVED_MODEL_PUBLIC_C_SAVED_MODEL_API_H_
diff --git a/tensorflow/c/experimental/saved_model/public/concrete_function.h b/tensorflow/c/experimental/saved_model/public/concrete_function.h
index 4cc2a4b..ee52922 100644
--- a/tensorflow/c/experimental/saved_model/public/concrete_function.h
+++ b/tensorflow/c/experimental/saved_model/public/concrete_function.h
@@ -19,7 +19,6 @@
 #include "tensorflow/c/c_api_macros.h"
 #include "tensorflow/c/eager/c_api.h"
 #include "tensorflow/c/experimental/saved_model/public/function_metadata.h"
-#include "tensorflow/c/experimental/saved_model/public/tensorhandle_list.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/tensorflow/c/experimental/saved_model/public/tensorhandle_list.h b/tensorflow/c/experimental/saved_model/public/tensorhandle_list.h
deleted file mode 100644
index a1e88db..0000000
--- a/tensorflow/c/experimental/saved_model/public/tensorhandle_list.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-==============================================================================*/
-
-#ifndef TENSORFLOW_C_EXPERIMENTAL_SAVED_MODEL_PUBLIC_TENSORHANDLE_LIST_H_
-#define TENSORFLOW_C_EXPERIMENTAL_SAVED_MODEL_PUBLIC_TENSORHANDLE_LIST_H_
-
-#include <stddef.h>
-
-#include "tensorflow/c/c_api_macros.h"
-#include "tensorflow/c/eager/c_api.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif  // __cplusplus
-
-// An opaque type that is acts like a list of TF_ConcreteFunction pointers.
-typedef struct TF_TensorHandleList TF_TensorHandleList;
-
-// Returns the size of `list`.
-TF_CAPI_EXPORT extern size_t TF_TensorHandleListSize(
-    const TF_TensorHandleList* list);
-
-// Returns the `i`th TFE_TensorHandle in the list.
-TF_CAPI_EXPORT extern TFE_TensorHandle* TF_TensorHandleListGet(
-    const TF_TensorHandleList* list, int i);
-
-#ifdef __cplusplus
-}  // end extern "C"
-#endif  // __cplusplus
-
-#endif  // TENSORFLOW_C_EXPERIMENTAL_SAVED_MODEL_PUBLIC_TENSORHANDLE_LIST_H_