llvm.org GIT mirror llvm / c82029e
[LLVM-C] Add accessors to the default floating-point metadata node Summary: Add a getter and setter pair for floating-point accuracy metadata. Reviewers: whitequark, deadalnix Reviewed By: whitequark Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60527 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358883 91177308-0d34-0410-b5e6-96231b3b80d8 Robert Widmann 3 months ago
2 changed file(s) with 30 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
35343534 * @see llvm::IRBuilder::SetInstDebugLocation()
35353535 */
35363536 void LLVMSetInstDebugLocation(LLVMBuilderRef Builder, LLVMValueRef Inst);
3537
3537
3538 /**
3539 * Get the dafult floating-point math metadata for a given builder.
3540 *
3541 * @see llvm::IRBuilder::getDefaultFPMathTag()
3542 */
3543 LLVMMetadataRef LLVMBuilderGetDefaultFPMathTag(LLVMBuilderRef Builder);
3544
3545 /**
3546 * Set the default floating-point math metadata for the given builder.
3547 *
3548 * To clear the metadata, pass NULL to \p FPMathTag.
3549 *
3550 * @see llvm::IRBuilder::setDefaultFPMathTag()
3551 */
3552 void LLVMBuilderSetDefaultFPMathTag(LLVMBuilderRef Builder,
3553 LLVMMetadataRef FPMathTag);
3554
35383555 /**
35393556 * Deprecated: Passing the NULL location will crash.
35403557 * Use LLVMGetCurrentDebugLocation2 instead.
30323032 unwrap(Builder)->SetInstDebugLocation(unwrap(Inst));
30333033 }
30343034
3035 void LLVMBuilderSetDefaultFPMathTag(LLVMBuilderRef Builder,
3036 LLVMMetadataRef FPMathTag) {
3037
3038 unwrap(Builder)->setDefaultFPMathTag(FPMathTag
3039 ? unwrap(FPMathTag)
3040 : nullptr);
3041 }
3042
3043 LLVMMetadataRef LLVMBuilderGetDefaultFPMathTag(LLVMBuilderRef Builder) {
3044 return wrap(unwrap(Builder)->getDefaultFPMathTag());
3045 }
3046
30353047 /*--.. Instruction builders ................................................--*/
30363048
30373049 LLVMValueRef LLVMBuildRetVoid(LLVMBuilderRef B) {