forked from OSchip/llvm-project
Support new 'any' support for pointer size and endianness
llvm-svn: 8119
This commit is contained in:
parent
55a07adc36
commit
8068e0cd17
|
@ -553,9 +553,17 @@ void AssemblyWriter::writeOperand(const Value *Operand, bool PrintType,
|
|||
|
||||
|
||||
void AssemblyWriter::printModule(const Module *M) {
|
||||
Out << "target endian = " << (M->isLittleEndian() ? "little" : "big") << "\n";
|
||||
Out << "target pointersize = " << (M->has32BitPointers() ? 32 : 64) << "\n";
|
||||
|
||||
switch (M->getEndianness()) {
|
||||
case Module::LittleEndian: Out << "target endian = little\n"; break;
|
||||
case Module::BigEndian: Out << "target endian = big\n"; break;
|
||||
case Module::AnyEndianness: break;
|
||||
}
|
||||
switch (M->getPointerSize()) {
|
||||
case Module::Pointer32: Out << "target pointersize = 32\n"; break;
|
||||
case Module::Pointer64: Out << "target pointersize = 64\n"; break;
|
||||
case Module::AnyPointerSize: break;
|
||||
}
|
||||
|
||||
// Loop over the symbol table, emitting all named constants...
|
||||
printSymbolTable(M->getSymbolTable());
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ struct GlobalValueRefMap {
|
|||
|
||||
|
||||
Module::Module(const std::string &MID)
|
||||
: ModuleID(MID), Endian(BigEndian), PtrSize(Pointer64) {
|
||||
: ModuleID(MID), Endian(AnyEndianness), PtrSize(AnyPointerSize) {
|
||||
FunctionList.setItemParent(this);
|
||||
FunctionList.setParent(this);
|
||||
GlobalList.setItemParent(this);
|
||||
|
|
Loading…
Reference in New Issue