[TypeSwitch] Use perfect forwarding in the cast functions
authorRiver Riddle <riddleriver@gmail.com>
Fri, 2 Dec 2022 08:19:28 +0000 (00:19 -0800)
committerRiver Riddle <riddleriver@gmail.com>
Fri, 2 Dec 2022 08:48:35 +0000 (00:48 -0800)
commitab7a683546c062a5f05c292fad9a4b71567fa409
tree96b14f1076f2fda973b347e5da805a4ac8178a44
parent60b6c93ee942496eb416018595c6308b5ae395e9
[TypeSwitch] Use perfect forwarding in the cast functions

This allows for properly supporting TypeSwitch on reference
types which do not support copying/do not want copying.
llvm/include/llvm/ADT/TypeSwitch.h