diff options
author | Chris Lattner <sabre@nondot.org> | 2001-10-14 23:24:46 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-10-14 23:24:46 +0000 |
commit | cbf0c2c3e3046e0bec800bd4628e507fbc5c214d (patch) | |
tree | e98adb97f9c6f08207f0f5477dddbd6bb2071d00 | |
parent | 164cb69e045f91900410781605cff7e5594460f2 (diff) |
Initializers are not const even if the GV is.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@805 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/GlobalVariable.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/GlobalVariable.h b/include/llvm/GlobalVariable.h index 66ab21c42a..cce4aaceae 100644 --- a/include/llvm/GlobalVariable.h +++ b/include/llvm/GlobalVariable.h @@ -35,9 +35,9 @@ public: // an initializer is specified. // inline bool hasInitializer() const { return !Operands.empty(); } - inline const ConstPoolVal *getInitializer() const { + inline ConstPoolVal *getInitializer() const { assert(hasInitializer() && "GV doesn't have initializer!"); - return (const ConstPoolVal*)Operands[0].get(); + return (ConstPoolVal*)Operands[0].get(); } inline ConstPoolVal *getInitializer() { assert(hasInitializer() && "GV doesn't have initializer!"); |