* @see llvm::IRBuilder::SetInstDebugLocation()
*/
void LLVMSetInstDebugLocation(LLVMBuilderRef Builder, LLVMValueRef Inst);
-
+
+/**
+ * Get the dafult floating-point math metadata for a given builder.
+ *
+ * @see llvm::IRBuilder::getDefaultFPMathTag()
+ */
+LLVMMetadataRef LLVMBuilderGetDefaultFPMathTag(LLVMBuilderRef Builder);
+
+/**
+ * Set the default floating-point math metadata for the given builder.
+ *
+ * To clear the metadata, pass NULL to \p FPMathTag.
+ *
+ * @see llvm::IRBuilder::setDefaultFPMathTag()
+ */
+void LLVMBuilderSetDefaultFPMathTag(LLVMBuilderRef Builder,
+ LLVMMetadataRef FPMathTag);
+
/**
* Deprecated: Passing the NULL location will crash.
* Use LLVMGetCurrentDebugLocation2 instead.
unwrap(Builder)->SetInstDebugLocation(unwrap<Instruction>(Inst));
}
+void LLVMBuilderSetDefaultFPMathTag(LLVMBuilderRef Builder,
+ LLVMMetadataRef FPMathTag) {
+
+ unwrap(Builder)->setDefaultFPMathTag(FPMathTag
+ ? unwrap<MDNode>(FPMathTag)
+ : nullptr);
+}
+
+LLVMMetadataRef LLVMBuilderGetDefaultFPMathTag(LLVMBuilderRef Builder) {
+ return wrap(unwrap(Builder)->getDefaultFPMathTag());
+}
+
/*--.. Instruction builders ................................................--*/
LLVMValueRef LLVMBuildRetVoid(LLVMBuilderRef B) {