[llvm-dev] Naming clash: -DCLS=n and CLS in code
llvm-dev at lists.llvm.org
Tue Jun 19 14:55:42 PDT 2018
> -----Original Message-----
> From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of
> U.Mutlu via llvm-dev
> Sent: Tuesday, June 19, 2018 3:12 PM
> To: Tim Northover
> Cc: LLVM Developers Mailing List
> Subject: Re: [llvm-dev] Naming clash: -DCLS=n and CLS in code
> This is from a famous article series titled "What every programmer should
> about memory":
> gcc -DCLS=$(getconf LEVEL1_DCACHE_LINESIZE) ...
> You can find more examples by searching for "DCLS getconf
Right, but there is nothing inherently significant about the symbol
name CLS. They could have called it MY_SILLY_PARAMETER and it would
have worked equally well. gcc attaches no special significance to
that name. Clang attaches no special significance to that name.
Changing the value of CLS works for the software in the article because
that software is written to make use of a symbol named CLS. That's all.
More information about the llvm-dev