1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Add a copy constructor for TargetData.

llvm-svn: 12948
This commit is contained in:
Brian Gaeke 2004-04-14 17:45:48 +00:00
parent 6e00f5b3dc
commit cd21d1e40f

View File

@ -42,6 +42,7 @@ class TargetData : public ImmutablePass {
unsigned char DoubleAlignment; // Defaults to 8 bytes unsigned char DoubleAlignment; // Defaults to 8 bytes
unsigned char PointerSize; // Defaults to 8 bytes unsigned char PointerSize; // Defaults to 8 bytes
unsigned char PointerAlignment; // Defaults to 8 bytes unsigned char PointerAlignment; // Defaults to 8 bytes
public: public:
TargetData(const std::string &TargetName = "", TargetData(const std::string &TargetName = "",
bool LittleEndian = false, bool LittleEndian = false,
@ -50,6 +51,21 @@ public:
unsigned char FloatAl = 4, unsigned char LongAl = 8, unsigned char FloatAl = 4, unsigned char LongAl = 8,
unsigned char IntAl = 4, unsigned char ShortAl = 2, unsigned char IntAl = 4, unsigned char ShortAl = 2,
unsigned char ByteAl = 1); unsigned char ByteAl = 1);
// Copy constructor
TargetData (const TargetData &TD) :
ImmutablePass (),
LittleEndian (TD.isLittleEndian ()),
ByteAlignment (TD.getByteAlignment ()),
ShortAlignment (TD.getShortAlignment ()),
IntAlignment (TD.getIntAlignment ()),
LongAlignment (TD.getLongAlignment ()),
FloatAlignment (TD.getFloatAlignment ()),
DoubleAlignment (TD.getDoubleAlignment ()),
PointerSize (TD.getPointerSize ()),
PointerAlignment (TD.getPointerAlignment ()) {
}
TargetData(const std::string &ToolName, const Module *M); TargetData(const std::string &ToolName, const Module *M);
~TargetData(); // Not virtual, do not subclass this class ~TargetData(); // Not virtual, do not subclass this class