This is an archive of the discontinued LLVM Phabricator instance.

[llvm][ADT] Move TypeSwitch class from MLIR to LLVM
ClosedPublic

Authored by rriddle on Apr 13 2020, 6:29 PM.

Details

Summary

This class implements a switch-like dispatch statement for a value of 'T' using dyn_cast functionality. Each Case<T> takes a callable to be invoked if the root value isa<T>, the callable is invoked with the result of dyn_cast<T>() as a parameter.

Depends On D78067

Diff Detail

Event Timeline

rriddle created this revision.Apr 13 2020, 6:29 PM
lattner accepted this revision.Apr 13 2020, 9:53 PM
This revision is now accepted and ready to land.Apr 13 2020, 9:53 PM
This revision was automatically updated to reflect the committed changes.
mlir/tools/mlir-tblgen/OpFormatGen.cpp