This is an archive of the discontinued LLVM Phabricator instance.

[MSP430AsmPrinter] Refactor special cases out of printOperand. NFC
AbandonedPublic

Authored by nickdesaulniers on Apr 15 2019, 4:47 PM.

Details

Reviewers
echristo
krisb
Summary

Refactoring to make changing the interface later simpler (trying to
remove Modifier from printOperand).

printOperand has an ominous comment for MO_GlobalAddress, but then no
unit tests (from what I can tell). Add some that pass before and after
changes, for fearless refactoring.

There is no "mem" modifier, so isMemOp is always false.

There's only special handling in the method printSrcMemOperand, so move
special logic there, simplifying printOperand.

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptApr 15 2019, 4:47 PM

Kristina has been in here the most, adding.