DI: Reverse direction of subprogram -> function edge.
[oota-llvm.git] / bindings / go / llvm / IRBindings.cpp
index fd0cb8006a4fe1b3f359f4448b128310943a35cd..4308f84cc1bea93855cfc55804444a81d09a1722 100644 (file)
@@ -98,3 +98,7 @@ void LLVMSetCurrentDebugLocation2(LLVMBuilderRef Bref, unsigned Line,
       DebugLoc::get(Line, Col, Scope ? unwrap<MDNode>(Scope) : nullptr,
                     InlinedAt ? unwrap<MDNode>(InlinedAt) : nullptr));
 }
+
+void LLVMSetSubprogram(LLVMValueRef Func, LLVMMetadataRef SP) {
+  unwrap<Function>(Func)->setSubprogram(unwrap<DISubprogram>(SP));
+}