mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-25 17:20:48 +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:
@@ -65,7 +65,7 @@ static const Target *GetTarget(const MachOObjectFile *MachOObj) {
|
||||
|
||||
errs() << "llvm-objdump: error: unable to get target for '" << TripleName
|
||||
<< "', see --version and --triple.\n";
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
struct SymbolSorter {
|
||||
@@ -226,7 +226,7 @@ static void DisassembleInputMachO2(StringRef Filename,
|
||||
TheTarget->createMCAsmInfo(*MRI, TripleName));
|
||||
std::unique_ptr<const MCSubtargetInfo> STI(
|
||||
TheTarget->createMCSubtargetInfo(TripleName, "", ""));
|
||||
MCContext Ctx(AsmInfo.get(), MRI.get(), 0);
|
||||
MCContext Ctx(AsmInfo.get(), MRI.get(), nullptr);
|
||||
std::unique_ptr<const MCDisassembler> DisAsm(
|
||||
TheTarget->createMCDisassembler(*STI, Ctx));
|
||||
int AsmPrinterVariant = AsmInfo->getAssemblerDialect();
|
||||
|
@@ -157,7 +157,7 @@ bool llvm::error(error_code EC) {
|
||||
return true;
|
||||
}
|
||||
|
||||
static const Target *getTarget(const ObjectFile *Obj = NULL) {
|
||||
static const Target *getTarget(const ObjectFile *Obj = nullptr) {
|
||||
// Figure out the target triple.
|
||||
llvm::Triple TheTriple("unknown-unknown-unknown");
|
||||
if (TripleName.empty()) {
|
||||
@@ -183,7 +183,7 @@ static const Target *getTarget(const ObjectFile *Obj = NULL) {
|
||||
Error);
|
||||
if (!TheTarget) {
|
||||
errs() << ToolName << ": " << Error;
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Update the triple name and return the found target.
|
||||
|
Reference in New Issue
Block a user