Details
- Reviewers
ruiu grimar • espindola
Diff Detail
- Repository
- rLLD LLVM Linker
- Build Status
Buildable 24442 Build 24441: arc lint + arc unit
Event Timeline
I believe Rui was not happy when I tried to use SaveAndRestore in one of my patches.
And honestly looking at this change I think now I understand why. It is shorter, but I would not call the new code simpler.
I'll leave this up to Rui.
Yeah, honestly I don't like SaveAndRestore. You can save one line per a use of SaveAndRestore, but instead everybody reading or writing the code need to learn what SaveAndRestore is. On the other hand, saving old values using local variables and assignments is really easy to read (besides that theoretically they could be overridden by operator overloading). SaveAndRestore is not a complicated class, so it's worth to learn how to use it if you have a lot of use cases of SaveAndRestore here, but three uses is too few.