Files
clang-p2996/llvm/utils/TableGen/FastISelEmitter.cpp
Rahul Joshi 5ee67ee6bc [LLVM][TableGen] Code cleanup in FastISelEmitter.cpp (#139644)
- Use StringRef instead of std::string for `InstructionMemo::Name`.
- Use range for loops, zip_equal and structured bindings in loops.
- Use llvm::any_of instead of manual loops.
- Use ListSeparator.
- Remove {} around single-line if-else chains.
- Use ArrayRef<> instead of const vector reference for function args.
- Change `getLegalCName` to accept a `StringRef` to avoid
StringRef->std::string casting in several places.
- Use StringRef instead of std::string for `OpcodeName` (and in
associated maps).

Tested by verifying no changes in .inc files with and without this
change.
2025-05-14 12:51:07 -07:00

29 KiB