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

Arthur Eubanks via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 5 09:51:31 PST 2023


================
@@ -57,6 +57,16 @@ global variable or function should be in after translation.
   let Heading = "section, __declspec(allocate)";
 }
 
+def CodeModelDocs : Documentation {
+  let Category = DocCatVariable;
+  let Content = [{
+The ``model`` attribute allows you to use a different code model for
----------------
aeubanks wrote:

Something like
```
The ``model`` attribute allows overriding the translation unit's code model (specified by ``-mcmodel``) for a specific global variable.
```
is clearer

https://github.com/llvm/llvm-project/pull/72078


More information about the cfe-commits mailing list