[PATCH] D44004: [ELF] - Show data and assignment commands in the map file.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 5 10:32:04 PST 2018
ruiu added inline comments.
================
Comment at: ELF/LinkerScript.h:111
+ // Keeps string representing the expression. Used when printing map file.
+ StringRef StringView;
+
----------------
StringView isn't a good name because we have std::string_view in modern C++.
================
Comment at: ELF/LinkerScript.h:113-114
+
+ unsigned Offset;
+ unsigned Size;
};
----------------
They need a comment.
================
Comment at: ELF/ScriptParser.cpp:779
+StringRef ScriptParser::buildStringView(StringRef Prefix, size_t StartTok, size_t EndTok) {
+ std::string S = Prefix;
----------------
Tok means a token, and position is not a token, so this name is confusing.
================
Comment at: ELF/ScriptParser.cpp:780-783
+ std::string S = Prefix;
+ for (size_t I = StartTok; I <= EndTok; ++I)
+ S += (" " + Tokens[I]).str();
+ return Saver.save(S);
----------------
You can use llvm::join, can't you?
https://reviews.llvm.org/D44004
More information about the llvm-commits
mailing list