mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-24 01:58:21 +00:00
Remove spurious cast of nullptr. NFC.
Conversion rules allow automatic casting of nullptr to any pointer type. llvm-svn: 302780
This commit is contained in:
parent
1b421c259f
commit
f4dc59ba8e
@ -3214,7 +3214,7 @@ RegisterCoalescer::copyCoalesceInMBB(MachineBasicBlock *MBB) {
|
||||
CurrList(WorkList.begin() + PrevSize, WorkList.end());
|
||||
if (copyCoalesceWorkList(CurrList))
|
||||
WorkList.erase(std::remove(WorkList.begin() + PrevSize, WorkList.end(),
|
||||
(MachineInstr*)nullptr), WorkList.end());
|
||||
nullptr), WorkList.end());
|
||||
}
|
||||
|
||||
void RegisterCoalescer::coalesceLocals() {
|
||||
|
@ -347,7 +347,7 @@ static bool terminalHasColors(int fd) {
|
||||
MutexGuard G(*TermColorMutex);
|
||||
|
||||
int errret = 0;
|
||||
if (setupterm((char *)nullptr, fd, &errret) != 0)
|
||||
if (setupterm(nullptr, fd, &errret) != 0)
|
||||
// Regardless of why, if we can't get terminfo, we shouldn't try to print
|
||||
// colors.
|
||||
return false;
|
||||
@ -369,7 +369,7 @@ static bool terminalHasColors(int fd) {
|
||||
|
||||
// Now extract the structure allocated by setupterm and free its memory
|
||||
// through a really silly dance.
|
||||
struct term *termp = set_curterm((struct term *)nullptr);
|
||||
struct term *termp = set_curterm(nullptr);
|
||||
(void)del_curterm(termp); // Drop any errors here.
|
||||
|
||||
// Return true if we found a color capabilities for the current terminal.
|
||||
|
@ -257,7 +257,7 @@ bool OptimizePICCall::isCallViaRegister(MachineInstr &MI, unsigned &Reg,
|
||||
|
||||
// Get the instruction that loads the function address from the GOT.
|
||||
Reg = MO->getReg();
|
||||
Val = (Value*)nullptr;
|
||||
Val = nullptr;
|
||||
MachineRegisterInfo &MRI = MI.getParent()->getParent()->getRegInfo();
|
||||
MachineInstr *DefMI = MRI.getVRegDef(Reg);
|
||||
|
||||
|
@ -179,7 +179,7 @@ void filterModule(
|
||||
else
|
||||
GO = new GlobalVariable(
|
||||
*M, GA->getValueType(), false, GlobalValue::ExternalLinkage,
|
||||
(Constant *)nullptr, "", (GlobalVariable *)nullptr,
|
||||
nullptr, "", nullptr,
|
||||
GA->getThreadLocalMode(), GA->getType()->getAddressSpace());
|
||||
GO->takeName(GA);
|
||||
GA->replaceAllUsesWith(GO);
|
||||
|
@ -96,7 +96,7 @@ std::unique_ptr<Module> llvm::CloneModule(
|
||||
else
|
||||
GV = new GlobalVariable(
|
||||
*New, I->getValueType(), false, GlobalValue::ExternalLinkage,
|
||||
(Constant *)nullptr, I->getName(), (GlobalVariable *)nullptr,
|
||||
nullptr, I->getName(), nullptr,
|
||||
I->getThreadLocalMode(), I->getType()->getAddressSpace());
|
||||
VMap[&*I] = GV;
|
||||
// We do not copy attributes (mainly because copying between different
|
||||
|
Loading…
x
Reference in New Issue
Block a user