summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c
diff options
context:
space:
mode:
authorRobert Widmann <devteam.codafi@gmail.com>2018-04-07 06:07:55 +0000
committerRobert Widmann <devteam.codafi@gmail.com>2018-04-07 06:07:55 +0000
commitf53050f0105c2e44a441a00a6e8aff28f16b905e (patch)
tree913564ef42e569113715d5dfd7466e11fbd9bd5b /llvm/include/llvm-c
parentde5f196530b508df3bc8c035ae1db87b56437d88 (diff)
downloadbcm5719-llvm-f53050f0105c2e44a441a00a6e8aff28f16b905e.tar.gz
bcm5719-llvm-f53050f0105c2e44a441a00a6e8aff28f16b905e.zip
[LLVM-C] Move DIBuilder Bindings For Block Scopes
Summary: Move LLVMDIBuilderCreateFunction , LLVMDIBuilderCreateLexicalBlock, and LLVMDIBuilderCreateLexicalBlockFile from Go to LLVM-C. Reviewers: whitequark, harlanhaskins, deadalnix Reviewed By: whitequark, harlanhaskins Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45352 llvm-svn: 329488
Diffstat (limited to 'llvm/include/llvm-c')
-rw-r--r--llvm/include/llvm-c/DebugInfo.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/llvm/include/llvm-c/DebugInfo.h b/llvm/include/llvm-c/DebugInfo.h
index 02ae1d51492..1fbf3caa23b 100644
--- a/llvm/include/llvm-c/DebugInfo.h
+++ b/llvm/include/llvm-c/DebugInfo.h
@@ -218,6 +218,56 @@ LLVMDIBuilderCreateFile(LLVMDIBuilderRef Builder, const char *Filename,
size_t DirectoryLen);
/**
+ * Create a new descriptor for the specified subprogram.
+ * \param Builder The \c DIBuilder.
+ * \param Scope Function scope.
+ * \param Name Function name.
+ * \param NameLen Length of enumeration name.
+ * \param LinkageName Mangled function name.
+ * \param LinkageNameLen Length of linkage name.
+ * \param File File where this variable is defined.
+ * \param LineNo Line number.
+ * \param Ty Function type.
+ * \param IsLocalToUnit True if this function is not externally visible.
+ * \param IsDefinition True if this is a function definition.
+ * \param ScopeLine Set to the beginning of the scope this starts
+ * \param Flags E.g.: \c LLVMDIFlagLValueReference. These flags are
+ * used to emit dwarf attributes.
+ * \param IsOptimized True if optimization is ON.
+ */
+LLVMMetadataRef LLVMDIBuilderCreateFunction(
+ LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
+ size_t NameLen, const char *LinkageName, size_t LinkageNameLen,
+ LLVMMetadataRef File, unsigned LineNo, LLVMMetadataRef Ty,
+ LLVMBool IsLocalToUnit, LLVMBool IsDefinition,
+ unsigned ScopeLine, LLVMDIFlags Flags, LLVMBool IsOptimized);
+
+/**
+ * Create a descriptor for a lexical block with the specified parent context.
+ * \param Builder The \c DIBuilder.
+ * \param Scope Parent lexical block.
+ * \param File Source file.
+ * \param Line The line in the source file.
+ * \param Column The column in the source file.
+ */
+LLVMMetadataRef LLVMDIBuilderCreateLexicalBlock(
+ LLVMDIBuilderRef Builder, LLVMMetadataRef Scope,
+ LLVMMetadataRef File, unsigned Line, unsigned Column);
+
+/**
+ * Create a descriptor for a lexical block with a new file attached.
+ * \param Builder The \c DIBuilder.
+ * \param Scope Lexical block.
+ * \param File Source file.
+ * \param Discriminator DWARF path discriminator value.
+ */
+LLVMMetadataRef
+LLVMDIBuilderCreateLexicalBlockFile(LLVMDIBuilderRef Builder,
+ LLVMMetadataRef Scope,
+ LLVMMetadataRef File,
+ unsigned Discriminator);
+
+/**
* Creates a new DebugLocation that describes a source location.
* \param Line The line in the source file.
* \param Column The column in the source file.
@@ -560,6 +610,20 @@ LLVMMetadataRef
LLVMDIBuilderCreateArtificialType(LLVMDIBuilderRef Builder,
LLVMMetadataRef Type);
+/**
+ * Get the metadata of the subprogram attached to a function.
+ *
+ * @see llvm::Function::getSubprogram()
+ */
+LLVMMetadataRef LLVMGetSubprogram(LLVMValueRef Func);
+
+/**
+ * Set the subprogram attached to a function.
+ *
+ * @see llvm::Function::setSubprogram()
+ */
+void LLVMSetSubprogram(LLVMValueRef Func, LLVMMetadataRef SP);
+
#ifdef __cplusplus
} /* end extern "C" */
#endif
OpenPOWER on IntegriCloud