Initializers are not const even if the GV is.
authorChris Lattner <sabre@nondot.org>
Sun, 14 Oct 2001 23:24:46 +0000 (23:24 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 14 Oct 2001 23:24:46 +0000 (23:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@805 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/GlobalVariable.h

index 66ab21c42af04b112a3d48d1c1f2dcae7da20b75..cce4aaceae3f32c1cea9a9607460fa06e1d2fe79 100644 (file)
@@ -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!");