[PATCH] D93372: [CSKY 3/n] Add bare-bones C-SKY MCTargetDesc
Min-Yih Hsu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 17 09:36:19 PST 2020
myhsu added inline comments.
================
Comment at: llvm/lib/Target/CSKY/MCTargetDesc/CSKYMCCodeEmitter.cpp:26
+
+template <int num>
+unsigned CSKYMCCodeEmitter::getOImmOpValue(const MCInst &MI, unsigned Idx,
----------------
Are `getOImmOpValue` and `getImmOpValue` only gonna used in this file? Because if they're used in other files, there will be a linker error saying that it can't find the template-instantiated version of these two functions (unless you //explicitly// instantiate every possible template arguments here). And I think in general you should avoid splitting template definitions from its declarations.
And also, why `num` is not used in both functions?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93372/new/
https://reviews.llvm.org/D93372
More information about the llvm-commits
mailing list