1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Avoid compiler warnings when assertions are turned off.

llvm-svn: 75269
This commit is contained in:
Duncan Sands 2009-07-10 20:10:14 +00:00
parent fff8443450
commit f32be25f82

View File

@ -323,8 +323,8 @@ const Section *
PIC16TargetAsmInfo::CreateBSSSectionForGlobal(const GlobalVariable *GV,
std::string Addr) const {
assert (GV->hasInitializer() && "This global doesn't need space");
Constant *C = GV->getInitializer();
assert (C->isNullValue() && "Unitialized globals has non-zero initializer");
assert (GV->getInitializer()->isNullValue() &&
"Unitialized global has non-zero initializer");
std::string Name;
// If address is given then create a section at that address else create a
// section by section name specified in GV.
@ -372,8 +372,8 @@ const Section *
PIC16TargetAsmInfo::CreateIDATASectionForGlobal(const GlobalVariable *GV,
std::string Addr) const {
assert (GV->hasInitializer() && "This global doesn't need space");
Constant *C = GV->getInitializer();
assert (!C->isNullValue() && "initialized globals has zero initializer");
assert (!GV->getInitializer()->isNullValue() &&
"initialized global has zero initializer");
assert (GV->getType()->getAddressSpace() == PIC16ISD::RAM_SPACE &&
"can be used for initialized RAM data only");