aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Module.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Module.h')
-rw-r--r--include/llvm/Module.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/Module.h b/include/llvm/Module.h
index 8e8f554abe..195c73d2f4 100644
--- a/include/llvm/Module.h
+++ b/include/llvm/Module.h
@@ -116,6 +116,11 @@ public:
/// @returns the module identifier as a string
const std::string &getModuleIdentifier() const { return ModuleID; }
+ /// Get the data layout string for the module's target platform. This encodes
+ /// the type sizes and alignments expected by this module.
+ /// @returns the data layout as a string
+ std::string getDataLayout() const { return DataLayout; }
+
/// Get the target triple which is a string describing the target host.
/// @returns a string containing the target triple.
const std::string &getTargetTriple() const { return TargetTriple; }
@@ -139,6 +144,9 @@ public:
/// Set the module identifier.
void setModuleIdentifier(const std::string &ID) { ModuleID = ID; }
+ /// Set the data layout
+ void setDataLayout(std::string DL) { DataLayout = DL; }
+
/// Set the target triple.
void setTargetTriple(const std::string &T) { TargetTriple = T; }