[llvm-commits] [llvm] r75269 - /llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp
Duncan Sands
baldrick at free.fr
Fri Jul 10 13:10:14 PDT 2009
Author: baldrick
Date: Fri Jul 10 15:10:14 2009
New Revision: 75269
URL: http://llvm.org/viewvc/llvm-project?rev=75269&view=rev
Log:
Avoid compiler warnings when assertions are turned off.
Modified:
llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp
Modified: llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp?rev=75269&r1=75268&r2=75269&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/PIC16/PIC16TargetAsmInfo.cpp Fri Jul 10 15:10:14 2009
@@ -323,8 +323,8 @@
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 @@
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");
More information about the llvm-commits
mailing list