diff options
author | Nick Desaulniers <ndesaulniers@google.com> | 2019-04-11 22:47:13 +0000 |
---|---|---|
committer | Nick Desaulniers <ndesaulniers@google.com> | 2019-04-11 22:47:13 +0000 |
commit | 8ec304c9fd92442393fcdd98f08fa07ac3ccf5df (patch) | |
tree | 2c922aaba1b2711b021da69f3643147520f6c048 /clang/lib/CodeGen/PatternInit.cpp | |
parent | 2edfcf9065940df55012a1d85f749437cce8c765 (diff) | |
download | bcm5719-llvm-8ec304c9fd92442393fcdd98f08fa07ac3ccf5df.tar.gz bcm5719-llvm-8ec304c9fd92442393fcdd98f08fa07ac3ccf5df.zip |
[X86AsmPrinter] refactor static functions into private methods. NFC
Summary:
A lot of the code for printing special cases of operands in this
translation unit are static functions. While I too have suffered many
years of abuse at the hands of C, we should prefer private methods,
particularly when you start passing around *this as your first argument,
which is a code smell.
This will help make generic vs arch specific asm printing easier, as it
brings X86AsmPrinter more in line with other arch's derived AsmPrinters.
We will then be able to more easily move architecture generic code to
the base class, and architecture specific code to the derived classes.
Some other small refactorings while we're here:
- the parameter Op is now consistently OpNo
- add spaces around binary expressions. I know we're not millionaires
but c'mon.
Reviewers: echristo
Reviewed By: echristo
Subscribers: smeenai, hiraditya, llvm-commits, srhines, craig.topper
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60577
llvm-svn: 358236
Diffstat (limited to 'clang/lib/CodeGen/PatternInit.cpp')
0 files changed, 0 insertions, 0 deletions