Skip to content

Commit 64a5afa

Browse files
committed
rustc: Add constants for LLVM function attributes
1 parent 02336e6 commit 64a5afa

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/comp/lib/llvm.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,30 @@ const uint LLVMCommonLinkage = 13u;
6565
const uint LLVMLinkerPrivateLinkage = 14u;
6666
const uint LLVMLinkerPrivateWeakLinkage = 15u;
6767

68+
const uint LLVMZExtAttribute = 1u;
69+
const uint LLVMSExtAttribute = 2u;
70+
const uint LLVMNoReturnAttribute = 4u;
71+
const uint LLVMInRegAttribute = 8u;
72+
const uint LLVMStructRetAttribute = 16u;
73+
const uint LLVMNoUnwindAttribute = 32u;
74+
const uint LLVMNoAliasAttribute = 64u;
75+
const uint LLVMByValAttribute = 128u;
76+
const uint LLVMNestAttribute = 256u;
77+
const uint LLVMReadNoneAttribute = 512u;
78+
const uint LLVMReadOnlyAttribute = 1024u;
79+
const uint LLVMNoInlineAttribute = 2048u;
80+
const uint LLVMAlwaysInlineAttribute = 4096u;
81+
const uint LLVMOptimizeForSizeAttribute = 8192u;
82+
const uint LLVMStackProtectAttribute = 16384u;
83+
const uint LLVMStackProtectReqAttribute = 32768u;
84+
const uint LLVMAlignmentAttribute = 2031616u; // 31 << 16
85+
const uint LLVMNoCaptureAttribute = 2097152u;
86+
const uint LLVMNoRedZoneAttribute = 4194304u;
87+
const uint LLVMNoImplicitFloatAttribute = 8388608u;
88+
const uint LLVMNakedAttribute = 16777216u;
89+
const uint LLVMInlineHintAttribute = 33554432u;
90+
const uint LLVMStackAttribute = 469762048u; // 7 << 26
91+
6892

6993
// Consts for the LLVM IntPredicate type, pre-cast to uint.
7094
// FIXME: as above.

0 commit comments

Comments
 (0)