mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
Add a copy constructor for TargetData.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12948 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ac84728d48
commit
325297142c
@ -42,6 +42,7 @@ class TargetData : public ImmutablePass {
|
||||
unsigned char DoubleAlignment; // Defaults to 8 bytes
|
||||
unsigned char PointerSize; // Defaults to 8 bytes
|
||||
unsigned char PointerAlignment; // Defaults to 8 bytes
|
||||
|
||||
public:
|
||||
TargetData(const std::string &TargetName = "",
|
||||
bool LittleEndian = false,
|
||||
@ -50,6 +51,21 @@ public:
|
||||
unsigned char FloatAl = 4, unsigned char LongAl = 8,
|
||||
unsigned char IntAl = 4, unsigned char ShortAl = 2,
|
||||
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(); // Not virtual, do not subclass this class
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user