diff options
author | Jay Foad <jay.foad@gmail.com> | 2011-06-19 18:37:11 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2011-06-19 18:37:11 +0000 |
commit | 7d715dfe6d66be257926f626df96a0e2bd38dc1f (patch) | |
tree | 3d034a039e81d42465bbf21eabebfddee5295ca8 /include | |
parent | 9cfcc6c1e14f5dc85757223335156ac18acb9479 (diff) |
Fix a FIXME by making GlobalVariable::getInitializer() return a
const Constant *.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133400 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/AsmPrinter.h | 4 | ||||
-rw-r--r-- | include/llvm/GlobalVariable.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h index 5eea0999b0..06c5c83c95 100644 --- a/include/llvm/CodeGen/AsmPrinter.h +++ b/include/llvm/CodeGen/AsmPrinter.h @@ -465,8 +465,8 @@ namespace llvm { void EmitJumpTableEntry(const MachineJumpTableInfo *MJTI, const MachineBasicBlock *MBB, unsigned uid) const; - void EmitLLVMUsedList(Constant *List); - void EmitXXStructorList(Constant *List); + void EmitLLVMUsedList(const Constant *List); + void EmitXXStructorList(const Constant *List); GCMetadataPrinter *GetOrCreateGCPrinter(GCStrategy *C); }; } diff --git a/include/llvm/GlobalVariable.h b/include/llvm/GlobalVariable.h index 442e0c0e1b..0fe8993435 100644 --- a/include/llvm/GlobalVariable.h +++ b/include/llvm/GlobalVariable.h @@ -119,7 +119,7 @@ public: /// illegal to call this method if the global is external, because we cannot /// tell what the value is initialized to! /// - inline /*const FIXME*/ Constant *getInitializer() const { + inline const Constant *getInitializer() const { assert(hasInitializer() && "GV doesn't have initializer!"); return static_cast<Constant*>(Op<0>().get()); } |