[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.
Francesco Petrogalli via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 21 13:42:04 PST 2022
fpetrogalli added inline comments.
================
Comment at: llvm/utils/TableGen/RISCVTargetDefEmitter.cpp:52
+ for (auto &Def : Map) {
+ const auto &Record = Def.second;
+ if (Record->isSubClassOf("RISCVProcessorModelTUNE_PROC"))
----------------
barannikov88 wrote:
> fpetrogalli wrote:
> > barannikov88 wrote:
> > > Same for the loop above.
> > ```
> > /Users/fpetrogalli/projects/cpu-defs/upstream/llvm-project/llvm/utils/TableGen/RISCVTargetDefEmitter.cpp:38:17: error: variable 'Record' with type 'const auto *' has incompatible initializer of type 'const std::unique_ptr<llvm::Record>'
> > const auto *Record = Def.second;
> > ```
> Whoops, my bad, sorry.
> Never liked these 'auto's... Never know what is behind them. Looks like a raw pointer, but it is not.
>
I am not a fan either of `auto`. Removed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137517/new/
https://reviews.llvm.org/D137517
More information about the cfe-commits
mailing list