[PATCH] Refactor duplicate functions

Bernard Ogden bernard.ogden at arm.com
Thu Nov 21 08:19:43 PST 2013


getARMCPU and getLLVMArchSuffixForARM existed as very similar functions
in both ToolChain.cpp and Tools.cpp. Create a single implementation of
each in Tools.cpp, eliminate the duplicate and share via Tools.h.

Creates an 'arm' namespace in Tools.h to be used by any ARM-targetting tools.

GetArmArchForMArch and GetArmArchForMCpu seem to do similar things, but
specialised for Darwin. I've opted to leave them alone.

This addresses http://llvm.org/bugs/show_bug.cgi?id=17120, at least in part.

Depends on D2062

Fixes http://llvm.org/bugs/show_bug.cgi?id=17120

http://llvm-reviews.chandlerc.com/D2243

Files:
  lib/Driver/ToolChain.cpp
  lib/Driver/Tools.cpp
  lib/Driver/Tools.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2243.1.patch
Type: text/x-patch
Size: 16495 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131121/cf8d881e/attachment.bin>


More information about the cfe-commits mailing list