-//===-- llvm/Global.h - Class to represent a global variable -----*- C++ -*--=//
+//===-- llvm/Global.h - Class to represent a global variable ----*- C++ -*-===//
+//
+// 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 contains the declaration of the GlobalVariable class, which
// represents a single global variable (or constant) in the VM.
#define LLVM_GLOBAL_VARIABLE_H
#include "llvm/GlobalValue.h"
+
class Module;
class Constant;
class PointerType;
/// GlobalVariable ctor - If a parent module is specified, the global is
/// automatically inserted into the end of the specified modules global list.
///
- GlobalVariable(const Type *Ty, bool isConstant, bool isInternal,
+ GlobalVariable(const Type *Ty, bool isConstant, LinkageTypes Linkage,
Constant *Initializer = 0, const std::string &Name = "",
Module *Parent = 0);
/// runtime execution of the program. Assigning a value into the constant
/// leads to undefined behavior.
///
- inline bool isConstant() const { return isConstantGlobal; }
-
+ bool isConstant() const { return isConstantGlobal; }
+ void setConstant(bool Value) { isConstantGlobal = Value; }
+
virtual void print(std::ostream &OS) const;
// Methods for support type inquiry through isa, cast, and dyn_cast: