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 | 6002068c1323ec589471c92c35025f3699d92575 (patch) | |
| tree | e1f5aa008da462b8cbdf0ab0864778888f7f1c4f /llvm/lib/Target/TargetLoweringObjectFile.cpp | |
| parent | f3c6d6def51dd083aedf8f043db0c1ba69353b01 (diff) | |
| download | bcm5719-llvm-6002068c1323ec589471c92c35025f3699d92575.tar.gz bcm5719-llvm-6002068c1323ec589471c92c35025f3699d92575.zip | |
Fix a FIXME by making GlobalVariable::getInitializer() return a
const Constant *.
llvm-svn: 133400
Diffstat (limited to 'llvm/lib/Target/TargetLoweringObjectFile.cpp')
| -rw-r--r-- | llvm/lib/Target/TargetLoweringObjectFile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp index 3343384791f..3e2a768d2d2 100644 --- a/llvm/lib/Target/TargetLoweringObjectFile.cpp +++ b/llvm/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. |

