mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-15 19:24:33 +00:00
Simplify the targetdata ctor by not passing in a "targetname" which is always
ignored. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28829 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -45,19 +45,26 @@ class TargetData : public ImmutablePass {
|
|||||||
unsigned char PointerAlignment; // Defaults to 8 bytes
|
unsigned char PointerAlignment; // Defaults to 8 bytes
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/// Default ctor - This has to exist, because this is a pass, but it should
|
||||||
|
/// never be used.
|
||||||
|
TargetData() {
|
||||||
|
assert(0 && "ERROR: Bad TargetData ctor used. "
|
||||||
|
"Tool did not specify a TargetData to use?");
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
|
||||||
/// Constructs a TargetData from a string of the following format:
|
/// Constructs a TargetData from a string of the following format:
|
||||||
/// "E-p:64:64-d:64-f:32-l:64-i:32-s:16-b:8-B:8"
|
/// "E-p:64:64-d:64-f:32-l:64-i:32-s:16-b:8-B:8"
|
||||||
/// The above string is considered the default, and any values not specified
|
/// The above string is considered the default, and any values not specified
|
||||||
/// in the string will be assumed to be as above.
|
/// in the string will be assumed to be as above.
|
||||||
TargetData(const std::string &TargetName = "",
|
TargetData(const std::string &TargetDescription) {
|
||||||
const std::string &TargetDescription = "") {
|
|
||||||
assert(!TargetName.empty() &&
|
|
||||||
"ERROR: Tool did not specify a target data to use!");
|
|
||||||
init(TargetDescription);
|
init(TargetDescription);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy constructor
|
/// Initialize target data from properties stored in the module.
|
||||||
TargetData (const TargetData &TD) :
|
TargetData(const Module *M);
|
||||||
|
|
||||||
|
TargetData(const TargetData &TD) :
|
||||||
ImmutablePass(),
|
ImmutablePass(),
|
||||||
LittleEndian(TD.isLittleEndian()),
|
LittleEndian(TD.isLittleEndian()),
|
||||||
BoolAlignment(TD.getBoolAlignment()),
|
BoolAlignment(TD.getBoolAlignment()),
|
||||||
@@ -71,7 +78,6 @@ public:
|
|||||||
PointerAlignment(TD.getPointerAlignment()) {
|
PointerAlignment(TD.getPointerAlignment()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
TargetData(const std::string &ToolName, const Module *M);
|
|
||||||
~TargetData(); // Not virtual, do not subclass this class
|
~TargetData(); // Not virtual, do not subclass this class
|
||||||
|
|
||||||
/// init - Specify configuration if not available at ctor time.
|
/// init - Specify configuration if not available at ctor time.
|
||||||
|
Reference in New Issue
Block a user