summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c/Core.h
diff options
context:
space:
mode:
authorRobert Widmann <devteam.codafi@gmail.com>2018-01-30 21:34:29 +0000
committerRobert Widmann <devteam.codafi@gmail.com>2018-01-30 21:34:29 +0000
commit490a5808cd4eaa4dc86ed5ff69cda27e7f2c8c56 (patch)
treed78299fdd2b551f277090c230245cb95fc64fa13 /llvm/include/llvm-c/Core.h
parent59baf73a4dff3e19b5e0ecdd5b0801691b0db54f (diff)
downloadbcm5719-llvm-490a5808cd4eaa4dc86ed5ff69cda27e7f2c8c56.tar.gz
bcm5719-llvm-490a5808cd4eaa4dc86ed5ff69cda27e7f2c8c56.zip
[LLVM-C] Add Accessors For A Module's Source File Name
Summary: Also unblocks some cleanup in the echo-test. Reviewers: whitequark, deadalnix Reviewed By: whitequark Subscribers: harlanhaskins, llvm-commits Differential Revision: https://reviews.llvm.org/D42618 llvm-svn: 323819
Diffstat (limited to 'llvm/include/llvm-c/Core.h')
-rw-r--r--llvm/include/llvm-c/Core.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h
index f711bea2183..89e36c05688 100644
--- a/llvm/include/llvm-c/Core.h
+++ b/llvm/include/llvm-c/Core.h
@@ -566,6 +566,27 @@ const char *LLVMGetModuleIdentifier(LLVMModuleRef M, size_t *Len);
void LLVMSetModuleIdentifier(LLVMModuleRef M, const char *Ident, size_t Len);
/**
+ * Obtain the module's original source file name.
+ *
+ * @param M Module to obtain the name of
+ * @param Len Out parameter which holds the length of the returned string
+ * @return The original source file name of M
+ * @see Module::getSourceFileName()
+ */
+const char *LLVMGetSourceFileName(LLVMModuleRef M, size_t *Len);
+
+/**
+ * Set the original source file name of a module to a string Name with length
+ * Len.
+ *
+ * @param M The module to set the source file name of
+ * @param Name The string to set M's source file name to
+ * @param Len Length of Name
+ * @see Module::setSourceFileName()
+ */
+void LLVMSetSourceFileName(LLVMModuleRef M, const char *Name, size_t Len);
+
+/**
* Obtain the data layout for a module.
*
* @see Module::getDataLayoutStr()
OpenPOWER on IntegriCloud