[PATCH] D30315: [Driver] Move architecture-specific free helper functions to their own files.

David L. Jones via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 23 16:07:54 PST 2017


dlj created this revision.
Herald added subscribers: mgorny, nemanjai, jyknight, dschuff, srhines, danalbert, aemerson.
Herald added a reviewer: javed.absar.

This patch moves helper functions that are CPU-specific out of Driver.cpp and to
separate implementation files. The new files are named for the architecture,
e.g. ARMArch.cpp.

The next step after this will be to move OS-specific code, which I expect will
include many of the tool implementations, to similarly separate files.

Some CPU-specific functions are not being moved just yet. In cases where the
only caller is the platform-specific tools, I plan to move them together. An
example is Hexagon, where the only caller of the architecture-specific functions
are the tools themselves. (I'm happy to revise this choice, it just seems like
less churn to me.)

This does mean that some functions which were previously static are now exposed
through the library header Driver.h.


https://reviews.llvm.org/D30315

Files:
  lib/Driver/AArch64Arch.cpp
  lib/Driver/ARMArch.cpp
  lib/Driver/CMakeLists.txt
  lib/Driver/MipsArch.cpp
  lib/Driver/PPCArch.cpp
  lib/Driver/SparcArch.cpp
  lib/Driver/SystemZArch.cpp
  lib/Driver/Tools.cpp
  lib/Driver/Tools.h
  lib/Driver/X86Arch.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30315.89582.patch
Type: text/x-patch
Size: 135220 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170224/72a043cd/attachment-0001.bin>


More information about the cfe-commits mailing list