This is an archive of the discontinued LLVM Phabricator instance.

[NFCI] Refactor UnaryOperator class
ClosedPublic

Authored by cameron.mcinally on May 6 2019, 3:15 PM.

Details

Summary

I had originally placed the UnaryOperator class in llvm/IR/Instructions.h, with the other UnaryInstructions. However, I'm now thinking that it makes more sense to live in llvm/IR/InstrTypes.h, with BinaryOperator. It is more similar to BinaryOperator than any of the other UnaryInstructions.

It could go either way though, so basically just looking for opinions...

Diff Detail

Repository
rL LLVM

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMay 6 2019, 3:15 PM
craig.topper added inline comments.May 6 2019, 4:43 PM
llvm/include/llvm/IR/InstrTypes.h
80

Is this a functional change? Assuming anyone ever casts to UnaryInstruction.

You're right. Sorry, I missed that when plucking this from a larger change.

cameron.mcinally marked an inline comment as done.May 6 2019, 4:56 PM
This revision is now accepted and ready to land.May 6 2019, 5:01 PM
This revision was automatically updated to reflect the committed changes.