Skip to content
Unverified Commit 4df56629 authored by hev's avatar hev Committed by GitHub
Browse files

[clang] Add per-global code model attribute (#72078)



This patch adds a per-global code model attribute, which can override
the target's code model to access global variables.

Currently, the code model attribute is only supported on LoongArch. This
patch also maps GCC's code model names to LLVM's, which allows for
better compatibility between the two compilers.


Suggested-by: default avatarArthur Eubanks <aeubanks@google.com>
Link:
https://discourse.llvm.org/t/how-to-best-implement-code-model-overriding-for-certain-values/71816
Link:
https://discourse.llvm.org/t/rfc-add-per-global-code-model-attribute/74944



---------

Signed-off-by: default avatarWANG Rui <wangrui@loongson.cn>
parent 4f215fdd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment