[PATCH] D91418: [LLD][ELF] Rename lld elf driver main function

Reshabh Sharma via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 13 05:37:05 PST 2020


rksharma created this revision.
rksharma added a reviewer: ruiu.
Herald added subscribers: llvm-commits, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a reviewer: MaskRay.
Herald added a project: LLVM.
rksharma requested review of this revision.

This patch renames the main function in lld elf driver. Libraries linked to the lld elf library exposes this main function. When debugging code linked to such libraries and intending to set a breakpoint at main, the debugger also sets breakpoint at the main function at lld elf driver.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91418

Files:
  lld/ELF/Driver.cpp
  lld/ELF/Driver.h


Index: lld/ELF/Driver.h
===================================================================
--- lld/ELF/Driver.h
+++ lld/ELF/Driver.h
@@ -26,7 +26,7 @@
 
 class LinkerDriver {
 public:
-  void main(ArrayRef<const char *> args);
+  void linkerMain(ArrayRef<const char *> args);
   void addFile(StringRef path, bool withLOption);
   void addLibrary(StringRef name);
 
Index: lld/ELF/Driver.cpp
===================================================================
--- lld/ELF/Driver.cpp
+++ lld/ELF/Driver.cpp
@@ -111,7 +111,7 @@
 
   config->progName = args[0];
 
-  driver->main(args);
+  driver->linkerMain(args);
 
   // Exit immediately if we don't need to return to the caller.
   // This saves time because the overhead of calling destructors
@@ -454,7 +454,7 @@
       error("unknown -z value: " + StringRef(arg->getValue()));
 }
 
-void LinkerDriver::main(ArrayRef<const char *> argsArr) {
+void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
   ELFOptTable parser;
   opt::InputArgList args = parser.parse(argsArr.slice(1));
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91418.305105.patch
Type: text/x-patch
Size: 1045 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201113/56ffa43a/attachment.bin>


More information about the llvm-commits mailing list