[lld] r192167 - Rename path() -> getPath().
Rui Ueyama
ruiu at google.com
Mon Oct 7 21:57:08 PDT 2013
Author: ruiu
Date: Mon Oct 7 23:57:08 2013
New Revision: 192167
URL: http://llvm.org/viewvc/llvm-project?rev=192167&view=rev
Log:
Rename path() -> getPath().
Differential Revision: http://llvm-reviews.chandlerc.com/D1853
Modified:
lld/trunk/include/lld/Driver/CoreInputGraph.h
lld/trunk/include/lld/Driver/DarwinInputGraph.h
lld/trunk/include/lld/Driver/InputGraph.h
lld/trunk/include/lld/Driver/WinLinkInputGraph.h
lld/trunk/lib/Driver/WinLinkDriver.cpp
lld/trunk/unittests/DriverTests/DriverTest.h
Modified: lld/trunk/include/lld/Driver/CoreInputGraph.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Driver/CoreInputGraph.h?rev=192167&r1=192166&r2=192167&view=diff
==============================================================================
--- lld/trunk/include/lld/Driver/CoreInputGraph.h (original)
+++ lld/trunk/include/lld/Driver/CoreInputGraph.h Mon Oct 7 23:57:08 2013
@@ -42,7 +42,7 @@ public:
/// \brief Parse the input file to lld::File.
error_code parse(const LinkingContext &ctx, raw_ostream &diagnostics) {
- ErrorOr<StringRef> filePath = path(ctx);
+ ErrorOr<StringRef> filePath = getPath(ctx);
if (!filePath &&
error_code(filePath) == llvm::errc::no_such_file_or_directory)
return make_error_code(llvm::errc::no_such_file_or_directory);
Modified: lld/trunk/include/lld/Driver/DarwinInputGraph.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Driver/DarwinInputGraph.h?rev=192167&r1=192166&r2=192167&view=diff
==============================================================================
--- lld/trunk/include/lld/Driver/DarwinInputGraph.h (original)
+++ lld/trunk/include/lld/Driver/DarwinInputGraph.h Mon Oct 7 23:57:08 2013
@@ -42,7 +42,7 @@ public:
/// \brief Parse the input file to lld::File.
llvm::error_code parse(const LinkingContext &ctx, raw_ostream &diagnostics) {
- ErrorOr<StringRef> filePath = path(ctx);
+ ErrorOr<StringRef> filePath = getPath(ctx);
if (!filePath &&
error_code(filePath) == llvm::errc::no_such_file_or_directory)
return make_error_code(llvm::errc::no_such_file_or_directory);
Modified: lld/trunk/include/lld/Driver/InputGraph.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Driver/InputGraph.h?rev=192167&r1=192166&r2=192167&view=diff
==============================================================================
--- lld/trunk/include/lld/Driver/InputGraph.h (original)
+++ lld/trunk/include/lld/Driver/InputGraph.h Mon Oct 7 23:57:08 2013
@@ -249,7 +249,7 @@ public:
FileNode(StringRef path, int64_t ordinal = -1)
: InputElement(InputElement::Kind::File, ordinal), _path(path) {}
- virtual llvm::ErrorOr<StringRef> path(const LinkingContext &) const {
+ virtual ErrorOr<StringRef> getPath(const LinkingContext &) const {
return _path;
}
Modified: lld/trunk/include/lld/Driver/WinLinkInputGraph.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Driver/WinLinkInputGraph.h?rev=192167&r1=192166&r2=192167&view=diff
==============================================================================
--- lld/trunk/include/lld/Driver/WinLinkInputGraph.h (original)
+++ lld/trunk/include/lld/Driver/WinLinkInputGraph.h Mon Oct 7 23:57:08 2013
@@ -35,11 +35,11 @@ public:
return a->kind() == InputElement::Kind::File;
}
- virtual llvm::ErrorOr<StringRef> path(const LinkingContext &ctx) const;
+ virtual llvm::ErrorOr<StringRef> getPath(const LinkingContext &ctx) const;
/// \brief Parse the input file to lld::File.
llvm::error_code parse(const LinkingContext &ctx, raw_ostream &diagnostics) {
- ErrorOr<StringRef> filePath = path(ctx);
+ ErrorOr<StringRef> filePath = getPath(ctx);
if (!filePath &&
error_code(filePath) == llvm::errc::no_such_file_or_directory)
return make_error_code(llvm::errc::no_such_file_or_directory);
@@ -107,7 +107,7 @@ public:
PECOFFLibraryNode(PECOFFLinkingContext &ctx, StringRef path)
: PECOFFFileNode(ctx, path) {}
- virtual llvm::ErrorOr<StringRef> path(const LinkingContext &ctx) const;
+ virtual llvm::ErrorOr<StringRef> getPath(const LinkingContext &ctx) const;
};
} // namespace lld
Modified: lld/trunk/lib/Driver/WinLinkDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkDriver.cpp?rev=192167&r1=192166&r2=192167&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkDriver.cpp (original)
+++ lld/trunk/lib/Driver/WinLinkDriver.cpp Mon Oct 7 23:57:08 2013
@@ -238,7 +238,7 @@ parseArgs(int argc, const char *argv[],
} // namespace
-llvm::ErrorOr<StringRef> PECOFFFileNode::path(const LinkingContext &) const {
+ErrorOr<StringRef> PECOFFFileNode::getPath(const LinkingContext &) const {
if (_path.endswith(".lib"))
return _ctx.searchLibraryFile(_path);
if (llvm::sys::path::extension(_path).empty())
@@ -246,7 +246,7 @@ llvm::ErrorOr<StringRef> PECOFFFileNode:
return _path;
}
-llvm::ErrorOr<StringRef> PECOFFLibraryNode::path(const LinkingContext &) const {
+ErrorOr<StringRef> PECOFFLibraryNode::getPath(const LinkingContext &) const {
if (!_path.endswith(".lib"))
return _ctx.searchLibraryFile(_ctx.allocateString(_path.str() + ".lib"));
return _ctx.searchLibraryFile(_path);
@@ -536,7 +536,7 @@ bool WinLinkDriver::parse(int argc, cons
// with ".exe".
if (ctx.outputPath().empty()) {
SmallString<128> firstInputFilePath =
- *llvm::dyn_cast<FileNode>(&inputGraph[0])->path(ctx);
+ *dyn_cast<FileNode>(&inputGraph[0])->getPath(ctx);
llvm::sys::path::replace_extension(firstInputFilePath, ".exe");
ctx.setOutputPath(ctx.allocateString(firstInputFilePath.str()));
}
Modified: lld/trunk/unittests/DriverTests/DriverTest.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/DriverTest.h?rev=192167&r1=192166&r2=192167&view=diff
==============================================================================
--- lld/trunk/unittests/DriverTests/DriverTest.h (original)
+++ lld/trunk/unittests/DriverTests/DriverTest.h Mon Oct 7 23:57:08 2013
@@ -35,8 +35,7 @@ protected:
std::string inputFile(unsigned index) {
const InputElement &inputElement = linkingContext()->inputGraph()[index];
if (inputElement.kind() == InputElement::Kind::File)
- return *(llvm::dyn_cast<FileNode>(&inputElement))
- ->path(*linkingContext());
+ return *dyn_cast<FileNode>(&inputElement)->getPath(*linkingContext());
llvm_unreachable("not handling other types of input files");
}
More information about the llvm-commits
mailing list