Page MenuHomePhabricator

[PowerPC] Rename DarwinDirective to CPUDirective (NFC)
ClosedPublic

Authored by kbarton on Fri, Nov 15, 6:15 PM.

Details

Summary

This patch renames the DarwinDirective (used to identify which CPU was defined)
to CPUDirective. It also adds the getCPUDirective() method and replaces all uses
of getDarwinDirective() with getCPUDirective().

Once this patch lands and downstream users of the getDarwinDirective() method
have switched to the getCPUDirective() method, the old getDarwinDirective()
method will be removed.

Diff Detail

Event Timeline

kbarton created this revision.Fri, Nov 15, 6:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptFri, Nov 15, 6:15 PM
jsji added a reviewer: Restricted Project.Fri, Nov 15, 7:00 PM
jsji accepted this revision as: jsji.Fri, Nov 15, 7:23 PM

LGTM. Thanks for the clean up!
The only other instance containing DarwinDirective is ParseDarwinDirectiveMachine in PPCAsmParser.cpp , and it is for Mach-O parsing, so it is reasonable to do not rename it.

llvm/lib/Target/PowerPC/PPCSubtarget.h
172

Shall we explicitly add doxygen \deprecated in comments?

This revision is now accepted and ready to land.Fri, Nov 15, 7:23 PM
jhibbits accepted this revision.Sat, Nov 16, 9:55 AM
hfinkel accepted this revision as: hfinkel.Sun, Nov 17, 8:53 AM

LGTM too.

(One day we might also rename 'Directive' to something like 'TargetCPU', but this is a good step regardless).

kbarton marked an inline comment as done.Fri, Nov 22, 4:03 AM
kbarton added inline comments.
llvm/lib/Target/PowerPC/PPCSubtarget.h
172

I could, if you really want me to. Although I was hoping this wasn't going to be around long enough for that to make a difference.

jsji added inline comments.Fri, Nov 22, 12:27 PM
llvm/lib/Target/PowerPC/PPCSubtarget.h
172

I am fine with leaving it as it is now. Thanks.

kbarton marked 2 inline comments as done.Mon, Nov 25, 12:27 PM
This revision was automatically updated to reflect the committed changes.