Update to LLVM head and mark various ptrs as nonnull.
This commit is contained in:
parent
87ad19eb78
commit
90eeb92e10
6 changed files with 39 additions and 3 deletions
|
@ -119,8 +119,20 @@ extern "C" void LLVMAddColdAttribute(LLVMValueRef Fn) {
|
|||
Function *A = unwrap<Function>(Fn);
|
||||
A->addAttribute(AttributeSet::FunctionIndex, Attribute::Cold);
|
||||
}
|
||||
|
||||
extern "C" void LLVMAddNonNullAttribute(LLVMValueRef Arg) {
|
||||
Argument *A = unwrap<Argument>(Arg);
|
||||
A->addAttr(AttributeSet::get(A->getContext(), A->getArgNo() + 1, Attribute::NonNull));
|
||||
}
|
||||
|
||||
extern "C" void LLVMAddNonNullReturnAttribute(LLVMValueRef Fn) {
|
||||
Function *A = unwrap<Function>(Fn);
|
||||
A->addAttribute(AttributeSet::ReturnIndex, Attribute::NonNull);
|
||||
}
|
||||
#else
|
||||
extern "C" void LLVMAddColdAttribute(LLVMValueRef Fn) {}
|
||||
extern "C" void LLVMAddNonNullAttribute(LLVMValueRef Arg) {}
|
||||
extern "C" void LLVMAddNonNullReturnAttribute(LLVMValueRef Fn) {}
|
||||
#endif
|
||||
|
||||
extern "C" LLVMValueRef LLVMBuildAtomicLoad(LLVMBuilderRef B,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue