From 695dee063bcd40f154bb27b7beafcb3d4dd775ac Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sat, 3 Jun 2017 14:54:08 -0700 Subject: rustc: Implement the #[global_allocator] attribute This PR is an implementation of [RFC 1974] which specifies a new method of defining a global allocator for a program. This obsoletes the old `#![allocator]` attribute and also removes support for it. [RFC 1974]: https://github.com/rust-lang/rfcs/pull/197 The new `#[global_allocator]` attribute solves many issues encountered with the `#![allocator]` attribute such as composition and restrictions on the crate graph itself. The compiler now has much more control over the ABI of the allocator and how it's implemented, allowing much more freedom in terms of how this feature is implemented. cc #27389 --- src/librustc_llvm/ffi.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/librustc_llvm') diff --git a/src/librustc_llvm/ffi.rs b/src/librustc_llvm/ffi.rs index 770d16e5c02..9f0ee95b5a6 100644 --- a/src/librustc_llvm/ffi.rs +++ b/src/librustc_llvm/ffi.rs @@ -698,6 +698,7 @@ extern "C" { pub fn LLVMIsGlobalConstant(GlobalVar: ValueRef) -> Bool; pub fn LLVMSetGlobalConstant(GlobalVar: ValueRef, IsConstant: Bool); pub fn LLVMRustGetNamedValue(M: ModuleRef, Name: *const c_char) -> ValueRef; + pub fn LLVMSetTailCall(CallInst: ValueRef, IsTailCall: Bool); // Operations on functions pub fn LLVMAddFunction(M: ModuleRef, Name: *const c_char, FunctionTy: TypeRef) -> ValueRef; -- cgit 1.4.1-3-g733a5