X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FExecutionEngine%2FTargetSelect.cpp;h=b10d51f648628866bd917c8f658828ba008ad1cc;hb=487ecab8d41e70700ca27895127b99f955e31fd0;hp=558d8b37af12585e89e8f90d16b2bdef86fa5906;hpb=fe532ad6d6643219669056dc268d63fb29a8d1ee;p=oota-llvm.git diff --git a/lib/ExecutionEngine/TargetSelect.cpp b/lib/ExecutionEngine/TargetSelect.cpp index 558d8b37af1..b10d51f6486 100644 --- a/lib/ExecutionEngine/TargetSelect.cpp +++ b/lib/ExecutionEngine/TargetSelect.cpp @@ -47,7 +47,7 @@ TargetMachine *EngineBuilder::selectTarget(const Triple &TargetTriple, TheTriple.setTriple(sys::getProcessTriple()); // Adjust the triple to match what the user requested. - const Target *TheTarget = 0; + const Target *TheTarget = nullptr; if (!MArch.empty()) { for (TargetRegistry::iterator it = TargetRegistry::begin(), ie = TargetRegistry::end(); it != ie; ++it) { @@ -61,7 +61,7 @@ TargetMachine *EngineBuilder::selectTarget(const Triple &TargetTriple, if (ErrorStr) *ErrorStr = "No available targets are compatible with this -march, " "see -version for the available targets.\n"; - return 0; + return nullptr; } // Adjust the triple to match (if known), otherwise stick with the @@ -72,10 +72,10 @@ TargetMachine *EngineBuilder::selectTarget(const Triple &TargetTriple, } else { std::string Error; TheTarget = TargetRegistry::lookupTarget(TheTriple.getTriple(), Error); - if (TheTarget == 0) { + if (!TheTarget) { if (ErrorStr) *ErrorStr = Error; - return 0; + return nullptr; } } @@ -91,7 +91,7 @@ TargetMachine *EngineBuilder::selectTarget(const Triple &TargetTriple, // FIXME: non-iOS ARM FastISel is broken with MCJIT. if (UseMCJIT && TheTriple.getArch() == Triple::arm && - TheTriple.getOS() != Triple::IOS && + !TheTriple.isiOS() && OptLevel == CodeGenOpt::None) { OptLevel = CodeGenOpt::Less; }