refactor: Remove LLVMRustInsertPrivateGlobal and define_private_global
Since it can easily be implemented using the existing LLVM C API in terms of `LLVMAddGlobal` and `LLVMSetLinkage` and `define_private_global` was only used in one place.
This commit is contained in:
@@ -228,12 +228,6 @@ extern "C" LLVMValueRef LLVMRustGetOrInsertGlobal(LLVMModuleRef M,
|
||||
return wrap(GV);
|
||||
}
|
||||
|
||||
extern "C" LLVMValueRef LLVMRustInsertPrivateGlobal(LLVMModuleRef M,
|
||||
LLVMTypeRef Ty) {
|
||||
return wrap(new GlobalVariable(*unwrap(M), unwrap(Ty), false,
|
||||
GlobalValue::PrivateLinkage, nullptr));
|
||||
}
|
||||
|
||||
// Must match the layout of `rustc_codegen_llvm::llvm::ffi::AttributeKind`.
|
||||
enum class LLVMRustAttributeKind {
|
||||
AlwaysInline = 0,
|
||||
|
||||
Reference in New Issue
Block a user