mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
[C++] Use 'nullptr'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207394 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -224,13 +224,13 @@ public:
|
||||
}
|
||||
|
||||
explicit BitcodeReader(MemoryBuffer *buffer, LLVMContext &C)
|
||||
: Context(C), TheModule(0), Buffer(buffer), BufferOwned(false),
|
||||
LazyStreamer(0), NextUnreadBit(0), SeenValueSymbolTable(false),
|
||||
: Context(C), TheModule(nullptr), Buffer(buffer), BufferOwned(false),
|
||||
LazyStreamer(nullptr), NextUnreadBit(0), SeenValueSymbolTable(false),
|
||||
ValueList(C), MDValueList(C),
|
||||
SeenFirstFunctionBody(false), UseRelativeIDs(false) {
|
||||
}
|
||||
explicit BitcodeReader(DataStreamer *streamer, LLVMContext &C)
|
||||
: Context(C), TheModule(0), Buffer(0), BufferOwned(false),
|
||||
: Context(C), TheModule(nullptr), Buffer(nullptr), BufferOwned(false),
|
||||
LazyStreamer(streamer), NextUnreadBit(0), SeenValueSymbolTable(false),
|
||||
ValueList(C), MDValueList(C),
|
||||
SeenFirstFunctionBody(false), UseRelativeIDs(false) {
|
||||
@ -271,7 +271,7 @@ private:
|
||||
return ValueList.getValueFwdRef(ID, Ty);
|
||||
}
|
||||
BasicBlock *getBasicBlock(unsigned ID) const {
|
||||
if (ID >= FunctionBBs.size()) return 0; // Invalid ID
|
||||
if (ID >= FunctionBBs.size()) return nullptr; // Invalid ID
|
||||
return FunctionBBs[ID];
|
||||
}
|
||||
AttributeSet getAttributes(unsigned i) const {
|
||||
@ -293,15 +293,15 @@ private:
|
||||
if (ValNo < InstNum) {
|
||||
// If this is not a forward reference, just return the value we already
|
||||
// have.
|
||||
ResVal = getFnValueByID(ValNo, 0);
|
||||
return ResVal == 0;
|
||||
ResVal = getFnValueByID(ValNo, nullptr);
|
||||
return ResVal == nullptr;
|
||||
} else if (Slot == Record.size()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned TypeNo = (unsigned)Record[Slot++];
|
||||
ResVal = getFnValueByID(ValNo, getTypeByID(TypeNo));
|
||||
return ResVal == 0;
|
||||
return ResVal == nullptr;
|
||||
}
|
||||
|
||||
/// popValue - Read a value out of the specified record from slot 'Slot'.
|
||||
@ -320,14 +320,14 @@ private:
|
||||
bool getValue(SmallVectorImpl<uint64_t> &Record, unsigned Slot,
|
||||
unsigned InstNum, Type *Ty, Value *&ResVal) {
|
||||
ResVal = getValue(Record, Slot, InstNum, Ty);
|
||||
return ResVal == 0;
|
||||
return ResVal == nullptr;
|
||||
}
|
||||
|
||||
/// getValue -- Version of getValue that returns ResVal directly,
|
||||
/// or 0 if there is an error.
|
||||
Value *getValue(SmallVectorImpl<uint64_t> &Record, unsigned Slot,
|
||||
unsigned InstNum, Type *Ty) {
|
||||
if (Slot == Record.size()) return 0;
|
||||
if (Slot == Record.size()) return nullptr;
|
||||
unsigned ValNo = (unsigned)Record[Slot];
|
||||
// Adjust the ValNo, if it was encoded relative to the InstNum.
|
||||
if (UseRelativeIDs)
|
||||
@ -338,7 +338,7 @@ private:
|
||||
/// getValueSigned -- Like getValue, but decodes signed VBRs.
|
||||
Value *getValueSigned(SmallVectorImpl<uint64_t> &Record, unsigned Slot,
|
||||
unsigned InstNum, Type *Ty) {
|
||||
if (Slot == Record.size()) return 0;
|
||||
if (Slot == Record.size()) return nullptr;
|
||||
unsigned ValNo = (unsigned)decodeSignRotatedValue(Record[Slot]);
|
||||
// Adjust the ValNo, if it was encoded relative to the InstNum.
|
||||
if (UseRelativeIDs)
|
||||
|
Reference in New Issue
Block a user