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
This commit is contained in:
Jay Foad
2011-06-19 18:37:11 +00:00
parent 9cfcc6c1e1
commit 7d715dfe6d
9 changed files with 17 additions and 17 deletions
+2 -2
View File
@@ -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.