Add support for the new "target data" information in .ll files. This provides

a better encoding of the targets data layout, rather than trying to guess it
from the endianness and pointersize like before.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31030 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson
2006-10-18 02:21:12 +00:00
parent 9935dd9198
commit cf7ff2b4c8
4 changed files with 18 additions and 0 deletions

View File

@ -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; }