diff options
author | Chris Lattner <sabre@nondot.org> | 2006-06-16 18:11:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-06-16 18:11:26 +0000 |
commit | acbc07aa2216f84967a1bcccaca1a425b141f77a (patch) | |
tree | 97165cd65201741aa6b44c2eff9a36c2048baf05 /lib/Target/TargetData.cpp | |
parent | a827953c32e420740c281b4a38a056d15b180932 (diff) |
Remove ctor with each piece specifyable (which causes overload ambiguities),
add a new init method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28828 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetData.cpp')
-rw-r--r-- | lib/Target/TargetData.cpp | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp index f7b7b4c3e5..d2b6a54ecd 100644 --- a/lib/Target/TargetData.cpp +++ b/lib/Target/TargetData.cpp @@ -95,38 +95,7 @@ unsigned StructLayout::getElementContainingOffset(uint64_t Offset) const { // TargetData Class Implementation //===----------------------------------------------------------------------===// -TargetData::TargetData(const std::string &TargetName, - bool isLittleEndian, unsigned char PtrSize, - unsigned char PtrAl, unsigned char DoubleAl, - unsigned char FloatAl, unsigned char LongAl, - unsigned char IntAl, unsigned char ShortAl, - unsigned char ByteAl, unsigned char BoolAl) { - - // If this assert triggers, a pass "required" TargetData information, but the - // top level tool did not provide one for it. We do not want to default - // construct, or else we might end up using a bad endianness or pointer size! - // - assert(!TargetName.empty() && - "ERROR: Tool did not specify a target data to use!"); - - LittleEndian = isLittleEndian; - PointerSize = PtrSize; - PointerAlignment = PtrAl; - DoubleAlignment = DoubleAl; - FloatAlignment = FloatAl; - LongAlignment = LongAl; - IntAlignment = IntAl; - ShortAlignment = ShortAl; - ByteAlignment = ByteAl; - BoolAlignment = BoolAl; -} - -TargetData::TargetData(const std::string &TargetName, - const std::string &TargetDescription) { - assert(!TargetName.empty() && - "ERROR: Tool did not specify a target data to use!"); - - +void TargetData::init(const std::string &TargetDescription) { std::string temp = TargetDescription; LittleEndian = false; |