From 2d92336db0087ad295401865d7749d4d1cfe4846 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 29 Jan 2020 02:12:23 +0100 Subject: Another stab at making the gold plugin compile again --- llvm/tools/gold/gold-plugin.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'llvm/tools/gold') diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp index d0d837f..f68f718 100644 --- a/llvm/tools/gold/gold-plugin.cpp +++ b/llvm/tools/gold/gold-plugin.cpp @@ -685,8 +685,8 @@ static void getThinLTOOldAndNewSuffix(std::string &OldSuffix, options::thinlto_object_suffix_replace.find(";") != StringRef::npos); StringRef SuffixReplace = options::thinlto_object_suffix_replace; auto Split = SuffixReplace.split(';'); - OldSuffix = Split.first; - NewSuffix = Split.second; + OldSuffix = std::string(Split.first); + NewSuffix = std::string(Split.second); } /// Given the original \p Path to an output file, replace any filename @@ -839,7 +839,9 @@ static void getThinLTOOldAndNewPrefix(std::string &OldPrefix, std::string &NewPrefix) { StringRef PrefixReplace = options::thinlto_prefix_replace; assert(PrefixReplace.empty() || PrefixReplace.find(";") != StringRef::npos); - std::tie(OldPrefix, NewPrefix) = PrefixReplace.split(';'); + auto Split = PrefixReplace.split(';'); + OldPrefix = std::string(Split.first); + NewPrefix = std::string(Split.second); } /// Creates instance of LTO. -- cgit v1.1