summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLogan Chien <loganchien@google.com>2018-07-10 11:14:52 +0800
committerLogan Chien <loganchien@google.com>2018-07-10 13:06:26 +0800
commitfcb56510b39e391c76f4931a64d19569024fbf1d (patch)
treee90860c1e107c9a4df2e04e359e5f0e24755c49a
parent726e32dc8ba26fdc43a3dfab5223ded76b61c717 (diff)
downloadbinutils-fcb56510b39e391c76f4931a64d19569024fbf1d.tar.gz
Fix dwarf_reader.cc for C++11android-p-preview-5
This commit replaces `std::make_pair<int, std::string>(dirindex, path)` with `std::make_pair(dirindex, path)` because C++11 replaces `std::make_pair<T, V>(T t, V v)` with `std::make_pair<T, V>(T &&t, V &&v)`. This commit removes explicit template arguments because forward references are only available during template arguments deduction. If the explicit template arguments are specified, the argument `t` and `v` will become R-value references, which can not bind to an L-value. Test: It builds with clang++ (or g++) with CXXFLAGS="-std=c++11" Change-Id: I79eb94552445354f7e7bff02169879195c7f6283
-rw-r--r--binutils-2.27/gold/dwarf_reader.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/binutils-2.27/gold/dwarf_reader.cc b/binutils-2.27/gold/dwarf_reader.cc
index 6c2b0082..c750ae41 100644
--- a/binutils-2.27/gold/dwarf_reader.cc
+++ b/binutils-2.27/gold/dwarf_reader.cc
@@ -1961,7 +1961,7 @@ Sized_dwarf_line_info<size, big_endian>::read_header_tables_v5(
}
gold_debug(DEBUG_LOCATION, "File %3d: %s",
static_cast<int>(file_list.size()), path);
- file_list.push_back(std::make_pair<int, std::string>(dirindex, path));
+ file_list.push_back(std::make_pair(dirindex, path));
}
delete[] types;