[lld] r262191 - Make the entry point function calls consistent. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 28 11:54:52 PST 2016
Author: ruiu
Date: Sun Feb 28 13:54:51 2016
New Revision: 262191
URL: http://llvm.org/viewvc/llvm-project?rev=262191&view=rev
Log:
Make the entry point function calls consistent. NFC.
Modified:
lld/trunk/COFF/Driver.cpp
lld/trunk/COFF/Driver.h
lld/trunk/include/lld/Driver/Driver.h
lld/trunk/tools/lld/lld.cpp
Modified: lld/trunk/COFF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.cpp?rev=262191&r1=262190&r2=262191&view=diff
==============================================================================
--- lld/trunk/COFF/Driver.cpp (original)
+++ lld/trunk/COFF/Driver.cpp Sun Feb 28 13:54:51 2016
@@ -40,12 +40,13 @@ namespace coff {
Configuration *Config;
LinkerDriver *Driver;
-void link(llvm::ArrayRef<const char *> Args) {
+bool link(llvm::ArrayRef<const char *> Args) {
Configuration C;
LinkerDriver D;
Config = &C;
Driver = &D;
- return Driver->link(Args);
+ Driver->link(Args);
+ return true;
}
// Drop directory components and replace extension with ".exe".
Modified: lld/trunk/COFF/Driver.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.h?rev=262191&r1=262190&r2=262191&view=diff
==============================================================================
--- lld/trunk/COFF/Driver.h (original)
+++ lld/trunk/COFF/Driver.h Sun Feb 28 13:54:51 2016
@@ -35,7 +35,7 @@ using llvm::Optional;
class InputFile;
// Entry point of the COFF linker.
-void link(llvm::ArrayRef<const char *> Args);
+bool link(llvm::ArrayRef<const char *> Args);
// Implemented in MarkLive.cpp.
void markLive(const std::vector<Chunk *> &Chunks);
Modified: lld/trunk/include/lld/Driver/Driver.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Driver/Driver.h?rev=262191&r1=262190&r2=262191&view=diff
==============================================================================
--- lld/trunk/include/lld/Driver/Driver.h (original)
+++ lld/trunk/include/lld/Driver/Driver.h Sun Feb 28 13:54:51 2016
@@ -71,7 +71,7 @@ private:
/// Driver for Windows 'link.exe' command line options
namespace coff {
-void link(llvm::ArrayRef<const char *> args);
+bool link(llvm::ArrayRef<const char *> args);
}
namespace elf {
Modified: lld/trunk/tools/lld/lld.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/tools/lld/lld.cpp?rev=262191&r1=262190&r2=262191&view=diff
==============================================================================
--- lld/trunk/tools/lld/lld.cpp (original)
+++ lld/trunk/tools/lld/lld.cpp Sun Feb 28 13:54:51 2016
@@ -113,14 +113,13 @@ int main(int Argc, const char **Argv) {
std::vector<const char *> Args(Argv, Argv + Argc);
switch (parseFlavor(Args)) {
case Gnu:
- return !elf::link(Args, errs());
+ return !elf::link(Args);
case WinLink:
- coff::link(Args);
- return 0;
+ return !coff::link(Args);
case Darwin:
- return !DarwinLdDriver::linkMachO(Args, errs());
+ return !DarwinLdDriver::linkMachO(Args);
case Core:
- return !CoreDriver::link(Args, errs());
+ return !CoreDriver::link(Args);
default:
die("-flavor option is missing. Available flavors are "
"gnu, darwin or link.");
More information about the llvm-commits
mailing list