Made the complicated if statements into a switch statement.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
+ mehdi
I think the FIXME is about not duplicating code from LTOCodeGenerator, not how terrible if statement looks.
This comment was removed by gAlfonso-bit.
Comment Actions
Can you unify the duplicated code or just put the FIXME back saying need to fix the duplicated code in the future?
Does the original code break any linter? Or it is just an attempt to rewrite the code using switch?
llvm/lib/LTO/LTOCodeGenerator.cpp | ||
---|---|---|
347 ↗ | (On Diff #364993) | You've deleted this |
Comment Actions
Should I just have the logic in a function? If I do, should I assume macOS is the target and cpu is empty or should I add those checks in the function?