Skip to content

Commit 03bba67

Browse files
committed
---
yaml --- r: 273249 b: refs/heads/beta c: 763b6cb h: refs/heads/master i: 273247: 216fd9f
1 parent 12247d8 commit 03bba67

File tree

2 files changed

+26
-41
lines changed

2 files changed

+26
-41
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 1d7c9bd137b883623921a7befb57ed8781a0e614
26+
refs/heads/beta: 763b6cba37438d16156f7b3c372e2f34f2def623
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/librustc_llvm/lib.rs

Lines changed: 25 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -151,41 +151,40 @@ bitflags! {
151151
const OptimizeForSize = 1 << 13,
152152
const StackProtect = 1 << 14,
153153
const StackProtectReq = 1 << 15,
154-
const Alignment = 1 << 16,
155154
const NoCapture = 1 << 21,
156155
const NoRedZone = 1 << 22,
157156
const NoImplicitFloat = 1 << 23,
158157
const Naked = 1 << 24,
159158
const InlineHint = 1 << 25,
160-
const Stack = 7 << 26,
161159
const ReturnsTwice = 1 << 29,
162160
const UWTable = 1 << 30,
163161
const NonLazyBind = 1 << 31,
164-
const OptimizeNone = 1 << 42,
165-
}
166-
}
167162

168-
169-
#[repr(u64)]
170-
#[derive(Copy, Clone)]
171-
pub enum OtherAttribute {
172-
// The following are not really exposed in
173-
// the LLVM C api so instead to add these
174-
// we call a wrapper function in RustWrapper
175-
// that uses the C++ api.
176-
SanitizeAddressAttribute = 1 << 32,
177-
MinSizeAttribute = 1 << 33,
178-
NoDuplicateAttribute = 1 << 34,
179-
StackProtectStrongAttribute = 1 << 35,
180-
SanitizeThreadAttribute = 1 << 36,
181-
SanitizeMemoryAttribute = 1 << 37,
182-
NoBuiltinAttribute = 1 << 38,
183-
ReturnedAttribute = 1 << 39,
184-
ColdAttribute = 1 << 40,
185-
BuiltinAttribute = 1 << 41,
186-
OptimizeNoneAttribute = 1 << 42,
187-
InAllocaAttribute = 1 << 43,
188-
NonNullAttribute = 1 << 44,
163+
// Some of these are missing from the LLVM C API, the rest are
164+
// present, but commented out, and preceded by the following warning:
165+
// FIXME: These attributes are currently not included in the C API as
166+
// a temporary measure until the API/ABI impact to the C API is understood
167+
// and the path forward agreed upon.
168+
const SanitizeAddress = 1 << 32;
169+
const MinSize = 1 << 33;
170+
const NoDuplicate = 1 << 34;
171+
const StackProtectStrong = 1 << 35;
172+
const SanitizeThread = 1 << 36;
173+
const SanitizeMemory = 1 << 37;
174+
const NoBuiltin = 1 << 38;
175+
const Returned = 1 << 39;
176+
const Cold = 1 << 40;
177+
const Builtin = 1 << 41;
178+
const OptimizeNone = 1 << 42;
179+
const InAlloca = 1 << 43;
180+
const NonNull = 1 << 44;
181+
const JumpTable = 1 << 45;
182+
const Convergent = 1 << 46;
183+
const SafeStack = 1 << 47;
184+
const NoRecurse = 1 << 48;
185+
const InaccessibleMemOnly = 1 << 49;
186+
const InaccessibleMemOrArgMemOnly = 1 << 50;
187+
}
189188
}
190189

191190
#[derive(Copy, Clone)]
@@ -219,20 +218,6 @@ impl AttrHelper for Attribute {
219218
}
220219
}
221220

222-
impl AttrHelper for OtherAttribute {
223-
fn apply_llfn(&self, idx: c_uint, llfn: ValueRef) {
224-
unsafe {
225-
LLVMAddFunctionAttribute(llfn, idx, *self as uint64_t);
226-
}
227-
}
228-
229-
fn apply_callsite(&self, idx: c_uint, callsite: ValueRef) {
230-
unsafe {
231-
LLVMAddCallSiteAttribute(callsite, idx, *self as uint64_t);
232-
}
233-
}
234-
}
235-
236221
impl AttrHelper for SpecialAttribute {
237222
fn apply_llfn(&self, idx: c_uint, llfn: ValueRef) {
238223
match *self {

0 commit comments

Comments
 (0)