Page MenuHomePhabricator

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

Authored by dlj on Feb 23 2017, 4:07 PM.



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.

Diff Detail


Event Timeline

dlj created this revision.Feb 23 2017, 4:07 PM
dlj updated this revision to Diff 89584.Feb 23 2017, 4:17 PM
  • Clang-include-fixed the includes.
rsmith accepted this revision.Feb 23 2017, 4:22 PM

It might make sense to move the *Arch.cpp files to a subdirectory of lib/Driver, but otherwise this looks good.

This revision is now accepted and ready to land.Feb 23 2017, 4:22 PM
dlj updated this revision to Diff 89586.Feb 23 2017, 4:29 PM
  • Moved new files to lib/Driver/Arch, and shortened the filenames
dlj updated this revision to Diff 89587.Feb 23 2017, 4:38 PM

Merge and rebase

This revision was automatically updated to reflect the committed changes.