Pass LLVM string attributes as string slices

This commit is contained in:
Tomasz Miąsko 2022-03-03 00:00:00 +00:00
parent 08504c64aa
commit 926bf1a371
5 changed files with 47 additions and 43 deletions

View file

@ -267,12 +267,6 @@ extern "C" LLVMAttributeRef LLVMRustCreateAttrNoValue(LLVMContextRef C,
return wrap(Attribute::get(*unwrap(C), fromRust(RustAttr)));
}
extern "C" LLVMAttributeRef LLVMRustCreateAttrStringValue(LLVMContextRef C,
const char *Name,
const char *Value) {
return wrap(Attribute::get(*unwrap(C), StringRef(Name), StringRef(Value)));
}
extern "C" LLVMAttributeRef LLVMRustCreateAlignmentAttr(LLVMContextRef C,
uint64_t Bytes) {
return wrap(Attribute::getWithAlignment(*unwrap(C), llvm::Align(Bytes)));