[all-commits] [llvm/llvm-project] 941f06: [lld] Make error handling functions opaque

Fangrui Song via All-commits all-commits at lists.llvm.org
Thu Feb 17 11:55:11 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 941f06282a3d304a96c1ea71b335be5fc91d8f7c
      https://github.com/llvm/llvm-project/commit/941f06282a3d304a96c1ea71b335be5fc91d8f7c
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-02-17 (Thu, 17 Feb 2022)

  Changed paths:
    M lld/Common/ErrorHandler.cpp
    M lld/include/lld/Common/ErrorHandler.h

  Log Message:
  -----------
  [lld] Make error handling functions opaque

The inline `lld::error` expands to two function calls `errorHandler` and `error`
where the latter is opaque. Move the functions to .cpp files to decrease code
size.

My x86-64 lld executable is 9KiB smaller.

Reviewed By: #lld-macho, thakis

Differential Revision: https://reviews.llvm.org/D120002




More information about the All-commits mailing list