mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 16:17:17 +00:00
[C++] Use 'nullptr'. Tools edition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207176 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -295,7 +295,7 @@ static TargetMachine* GetTargetMachine(Triple TheTriple) {
|
||||
Error);
|
||||
// Some modules don't specify a triple, and this is okay.
|
||||
if (!TheTarget) {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Package up features to be passed to target/subtarget
|
||||
@@ -373,7 +373,7 @@ int main(int argc, char **argv) {
|
||||
std::unique_ptr<Module> M;
|
||||
M.reset(ParseIRFile(InputFilename, Err, Context));
|
||||
|
||||
if (M.get() == 0) {
|
||||
if (!M.get()) {
|
||||
Err.print(argv[0], errs());
|
||||
return 1;
|
||||
}
|
||||
@@ -453,7 +453,7 @@ int main(int argc, char **argv) {
|
||||
Passes.add(new DataLayoutPass(M.get()));
|
||||
|
||||
Triple ModuleTriple(M->getTargetTriple());
|
||||
TargetMachine *Machine = 0;
|
||||
TargetMachine *Machine = nullptr;
|
||||
if (ModuleTriple.getArch())
|
||||
Machine = GetTargetMachine(Triple(ModuleTriple));
|
||||
std::unique_ptr<TargetMachine> TM(Machine);
|
||||
@@ -537,7 +537,7 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
const PassInfo *PassInf = PassList[i];
|
||||
Pass *P = 0;
|
||||
Pass *P = nullptr;
|
||||
if (PassInf->getTargetMachineCtor())
|
||||
P = PassInf->getTargetMachineCtor()(TM.get());
|
||||
else if (PassInf->getNormalCtor())
|
||||
|
Reference in New Issue
Block a user