[PATCH] D152989: Pre-commit test for D151696.

Kan Shengchen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 27 20:02:14 PDT 2023


skan added inline comments.


================
Comment at: clang/test/CodeGen/attr-cpuspecific-cpus.c:12
+
+ATTR(cpu_specific(generic)) void CPU0(void){}
+ATTR(cpu_specific(pentium)) void CPU1(void){}
----------------
FreddyYe wrote:
> skan wrote:
> > Shouldn't we use the same function name?
> Emmm...  it would involve a new problem that some aliased cpu names would result a diagnostic like this:
> ```
> definition with same mangled name 'CPU.H' as another definition
> ```
> This is expected but my original purpose here is only to check if cpu name strings are valid. If you prefer, I can change into a style that makes the non-alias CPU names use the same function and makes the aliased ones' function names indexed. WDYT?
That would make sense to me.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152989/new/

https://reviews.llvm.org/D152989



More information about the cfe-commits mailing list