diff options
| author | Rui Ueyama <ruiu@google.com> | 2013-10-08 04:57:08 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2013-10-08 04:57:08 +0000 |
| commit | 53f31af7ea0d4460e299055ffbd1daba650ce136 (patch) | |
| tree | e47444fe83b85eb78dae899116f180e769c80bd2 | |
| parent | d2598e97a4ac39610111f7315220187f1c55c049 (diff) | |
| download | bcm5719-llvm-53f31af7ea0d4460e299055ffbd1daba650ce136.tar.gz bcm5719-llvm-53f31af7ea0d4460e299055ffbd1daba650ce136.zip | |
Rename path() -> getPath().
Differential Revision: http://llvm-reviews.chandlerc.com/D1853
llvm-svn: 192167
| -rw-r--r-- | lld/include/lld/Driver/CoreInputGraph.h | 2 | ||||
| -rw-r--r-- | lld/include/lld/Driver/DarwinInputGraph.h | 2 | ||||
| -rw-r--r-- | lld/include/lld/Driver/InputGraph.h | 2 | ||||
| -rw-r--r-- | lld/include/lld/Driver/WinLinkInputGraph.h | 6 | ||||
| -rw-r--r-- | lld/lib/Driver/WinLinkDriver.cpp | 6 | ||||
| -rw-r--r-- | lld/unittests/DriverTests/DriverTest.h | 3 |
6 files changed, 10 insertions, 11 deletions
diff --git a/lld/include/lld/Driver/CoreInputGraph.h b/lld/include/lld/Driver/CoreInputGraph.h index a24470f21a1..25e89a8bfc5 100644 --- a/lld/include/lld/Driver/CoreInputGraph.h +++ b/lld/include/lld/Driver/CoreInputGraph.h @@ -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); diff --git a/lld/include/lld/Driver/DarwinInputGraph.h b/lld/include/lld/Driver/DarwinInputGraph.h index 06ccf1687fd..620e39849bd 100644 --- a/lld/include/lld/Driver/DarwinInputGraph.h +++ b/lld/include/lld/Driver/DarwinInputGraph.h @@ -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); diff --git a/lld/include/lld/Driver/InputGraph.h b/lld/include/lld/Driver/InputGraph.h index 4267c19b910..ae32b250476 100644 --- a/lld/include/lld/Driver/InputGraph.h +++ b/lld/include/lld/Driver/InputGraph.h @@ -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; } diff --git a/lld/include/lld/Driver/WinLinkInputGraph.h b/lld/include/lld/Driver/WinLinkInputGraph.h index a1df5835a39..7587716cec2 100644 --- a/lld/include/lld/Driver/WinLinkInputGraph.h +++ b/lld/include/lld/Driver/WinLinkInputGraph.h @@ -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 diff --git a/lld/lib/Driver/WinLinkDriver.cpp b/lld/lib/Driver/WinLinkDriver.cpp index 67091bbe6ef..14268c8edf2 100644 --- a/lld/lib/Driver/WinLinkDriver.cpp +++ b/lld/lib/Driver/WinLinkDriver.cpp @@ -238,7 +238,7 @@ parseArgs(int argc, const char *argv[], raw_ostream &diagnostics, } // 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::path(const LinkingContext &) const { 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, const char *argv[], PECOFFLinkingContext &ct // 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())); } diff --git a/lld/unittests/DriverTests/DriverTest.h b/lld/unittests/DriverTests/DriverTest.h index ca7d1ba1721..2901c01c1bc 100644 --- a/lld/unittests/DriverTests/DriverTest.h +++ b/lld/unittests/DriverTests/DriverTest.h @@ -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"); } |

