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/Target/TargetLoweringObjectFile.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/Target/TargetLoweringObjectFile.cpp')
-rw-r--r-- | lib/Target/TargetLoweringObjectFile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/TargetLoweringObjectFile.cpp b/lib/Target/TargetLoweringObjectFile.cpp index 3343384791..3e2a768d2d 100644 --- a/lib/Target/TargetLoweringObjectFile.cpp +++ b/lib/Target/TargetLoweringObjectFile.cpp @@ -66,7 +66,7 @@ TargetLoweringObjectFile::~TargetLoweringObjectFile() { } static bool isSuitableForBSS(const GlobalVariable *GV) { - Constant *C = GV->getInitializer(); + const Constant *C = GV->getInitializer(); // Must have zero initializer. if (!C->isNullValue()) @@ -168,7 +168,7 @@ SectionKind TargetLoweringObjectFile::getKindForGlobal(const GlobalValue *GV, return SectionKind::getBSS(); } - Constant *C = GVar->getInitializer(); + const Constant *C = GVar->getInitializer(); // If the global is marked constant, we can put it into a mergable section, // a mergable string section, or general .data if it contains relocations. |