//
// The LLVM Compiler Infrastructure
//
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
void setNext(GlobalVariable *N) { Next = N; }
void setPrev(GlobalVariable *N) { Prev = N; }
- bool isConstantGlobal; // Is this a global constant?
- bool isThreadLocalSymbol; // Is this symbol "Thread Local"?
+ bool isConstantGlobal : 1; // Is this a global constant?
+ bool isThreadLocalSymbol : 1; // Is this symbol "Thread Local"?
Use Initializer;
public:
/// automatically inserted into the end of the specified modules global list.
GlobalVariable(const Type *Ty, bool isConstant, LinkageTypes Linkage,
Constant *Initializer = 0, const std::string &Name = "",
- Module *Parent = 0, bool ThreadLocal = false);
+ Module *Parent = 0, bool ThreadLocal = false,
+ unsigned AddressSpace = 0);
/// GlobalVariable ctor - This creates a global and inserts it before the
/// specified other global.
GlobalVariable(const Type *Ty, bool isConstant, LinkageTypes Linkage,
Constant *Initializer, const std::string &Name,
- GlobalVariable *InsertBefore, bool ThreadLocal = false);
+ GlobalVariable *InsertBefore, bool ThreadLocal = false,
+ unsigned AddressSpace = 0);
/// isDeclaration - Is this global variable lacking an initializer? If so,
/// the global variable is defined in some other translation unit, and is thus
}
}
- // getNext/Prev - Return the next or previous global variable in the list.
- GlobalVariable *getNext() { return Next; }
- const GlobalVariable *getNext() const { return Next; }
- GlobalVariable *getPrev() { return Prev; }
- const GlobalVariable *getPrev() const { return Prev; }
-
/// If the value is a global constant, its value is immutable throughout the
/// runtime execution of the program. Assigning a value into the constant
/// leads to undefined behavior.
static inline bool classof(const Value *V) {
return V->getValueID() == Value::GlobalVariableVal;
}
+private:
+ // getNext/Prev - Return the next or previous global variable in the list.
+ GlobalVariable *getNext() { return Next; }
+ const GlobalVariable *getNext() const { return Next; }
+ GlobalVariable *getPrev() { return Prev; }
+ const GlobalVariable *getPrev() const { return Prev; }
};
} // End llvm namespace