aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/metadata
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/metadata')
-rw-r--r--gcc/rust/metadata/rust-export-metadata.cc2
-rw-r--r--gcc/rust/metadata/rust-import-archive.cc5
-rw-r--r--gcc/rust/metadata/rust-imports.cc5
3 files changed, 5 insertions, 7 deletions
diff --git a/gcc/rust/metadata/rust-export-metadata.cc b/gcc/rust/metadata/rust-export-metadata.cc
index 79c5f30..771bec6 100644
--- a/gcc/rust/metadata/rust-export-metadata.cc
+++ b/gcc/rust/metadata/rust-export-metadata.cc
@@ -234,7 +234,7 @@ PublicInterface::write_to_path (const std::string &path) const
{
// validate path contains correct extension
const std::string expected_file_name = expected_metadata_filename ();
- const char *path_base_name = basename (path.c_str ());
+ const char *path_base_name = lbasename (path.c_str ());
if (strcmp (path_base_name, expected_file_name.c_str ()) != 0)
{
rust_error_at (UNDEF_LOCATION,
diff --git a/gcc/rust/metadata/rust-import-archive.cc b/gcc/rust/metadata/rust-import-archive.cc
index 6c392b0..cf24607 100644
--- a/gcc/rust/metadata/rust-import-archive.cc
+++ b/gcc/rust/metadata/rust-import-archive.cc
@@ -7,7 +7,6 @@
#include "rust-system.h"
#include "rust-diagnostics.h"
#include "rust-imports.h"
-#include "rust-make-unique.h"
#ifndef O_BINARY
#define O_BINARY 0
@@ -844,7 +843,7 @@ Import::find_archive_export_data (const std::string &filename, int fd,
if (!afile.initialize ())
return nullptr;
- auto ret = Rust::make_unique<Stream_concatenate> ();
+ auto ret = std::make_unique<Stream_concatenate> ();
bool any_data = false;
bool any_members = false;
@@ -872,7 +871,7 @@ Import::find_archive_export_data (const std::string &filename, int fd,
if (!any_members)
{
// It's normal to have an empty archive file when using gobuild.
- return Rust::make_unique<Stream_from_string> ("");
+ return std::make_unique<Stream_from_string> ("");
}
if (!any_data)
diff --git a/gcc/rust/metadata/rust-imports.cc b/gcc/rust/metadata/rust-imports.cc
index f2ab105..8d5c381 100644
--- a/gcc/rust/metadata/rust-imports.cc
+++ b/gcc/rust/metadata/rust-imports.cc
@@ -21,7 +21,6 @@
#include "rust-imports.h"
#include "rust-object-export.h"
#include "rust-export-metadata.h"
-#include "rust-make-unique.h"
#ifndef O_BINARY
#define O_BINARY 0
@@ -259,7 +258,7 @@ Import::find_export_data (const std::string &filename, int fd,
//
if (memcmp (buf, Metadata::kMagicHeader, sizeof (Metadata::kMagicHeader))
== 0)
- return Rust::make_unique<Stream_from_file> (fd);
+ return std::make_unique<Stream_from_file> (fd);
// See if we can read this as an archive.
if (Import::is_archive_magic (buf))
@@ -291,7 +290,7 @@ Import::find_object_export_data (const std::string &filename, int fd,
if (buf == nullptr)
return nullptr;
- return Rust::make_unique<Stream_from_buffer> (buf, len);
+ return std::make_unique<Stream_from_buffer> (buf, len);
}
// Class Import.