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 /lib/CodeGen/ELFWriter.cpp | |
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 'lib/CodeGen/ELFWriter.cpp')
-rw-r--r-- | lib/CodeGen/ELFWriter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/ELFWriter.cpp b/lib/CodeGen/ELFWriter.cpp index fa2319bff7..d977651c32 100644 --- a/lib/CodeGen/ELFWriter.cpp +++ b/lib/CodeGen/ELFWriter.cpp @@ -659,11 +659,11 @@ bool ELFWriter::EmitSpecialLLVMGlobal(const GlobalVariable *GV) { /// EmitXXStructorList - Emit the ctor or dtor list. This just emits out the /// function pointers, ignoring the init priority. -void ELFWriter::EmitXXStructorList(Constant *List, ELFSection &Xtor) { +void ELFWriter::EmitXXStructorList(const Constant *List, ELFSection &Xtor) { // Should be an array of '{ i32, void ()* }' structs. The first value is the // init priority, which we ignore. if (List->isNullValue()) return; - ConstantArray *InitList = cast<ConstantArray>(List); + const ConstantArray *InitList = cast<ConstantArray>(List); for (unsigned i = 0, e = InitList->getNumOperands(); i != e; ++i) { if (InitList->getOperand(i)->isNullValue()) continue; |