Mark pdfium::span<> as TRIVIAL_ABI and GSL_POINTER
Unlike base::span<>, pdfium::span<> is based on UnownedPtr<>, and
can benefit from being passed in registers despite having an
actual destructor.
Change-Id: I08bf1b342d246cb5f62eee5ff9722e5fb0471032
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/99231
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/third_party/base/span.h b/third_party/base/span.h
index ec9f990..1c9c934 100644
--- a/third_party/base/span.h
+++ b/third_party/base/span.h
@@ -15,6 +15,7 @@
#include "core/fxcrt/unowned_ptr.h"
#include "third_party/base/check.h"
+#include "third_party/base/compiler_specific.h"
namespace pdfium {
@@ -176,7 +177,7 @@
// [span], class template span
template <typename T>
-class span {
+class TRIVIAL_ABI GSL_POINTER span {
public:
using value_type = typename std::remove_cv<T>::type;
using pointer = T*;