[llvm-commits] CVS: llvm/include/llvm/Module.h
Chris Lattner
lattner at cs.uiuc.edu
Sun Aug 24 08:47:01 PDT 2003
Changes in directory llvm/include/llvm:
Module.h updated: 1.32 -> 1.33
---
Log message:
Allow modules to have 'any' pointer size and endianness.
---
Diffs of the changes:
Index: llvm/include/llvm/Module.h
diff -u llvm/include/llvm/Module.h:1.32 llvm/include/llvm/Module.h:1.33
--- llvm/include/llvm/Module.h:1.32 Mon Jul 28 14:17:53 2003
+++ llvm/include/llvm/Module.h Sun Aug 24 08:46:37 2003
@@ -33,8 +33,7 @@
static iplist<GlobalVariable> &getList(Module *M);
};
-class Module : public Annotable {
-public:
+struct Module : public Annotable {
typedef iplist<GlobalVariable> GlobalListType;
typedef iplist<Function> FunctionListType;
@@ -50,8 +49,8 @@
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
- enum Endianness { LittleEndian, BigEndian };
- enum PointerSize { Pointer32, Pointer64 };
+ enum Endianness { AnyEndianness, LittleEndian, BigEndian };
+ enum PointerSize { AnyPointerSize, Pointer32, Pointer64 };
private:
GlobalListType GlobalList; // The Global Variables in the module
@@ -79,14 +78,10 @@
const std::string &getModuleIdentifier() const { return ModuleID; }
/// Target endian information...
- bool isLittleEndian() const { return Endian == LittleEndian; }
- bool isBigEndian() const { return Endian == BigEndian; }
Endianness getEndianness() const { return Endian; }
void setEndianness(Endianness E) { Endian = E; }
/// Target Pointer Size information...
- bool has32BitPointers() const { return PtrSize == Pointer32; }
- bool has64BitPointers() const { return PtrSize == Pointer64; }
PointerSize getPointerSize() const { return PtrSize; }
void setPointerSize(PointerSize PS) { PtrSize = PS; }
More information about the llvm-commits
mailing list