summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Bitcode/BitstreamReader.h12
-rw-r--r--llvm/include/llvm/Bitcode/BitstreamWriter.h8
-rw-r--r--llvm/include/llvm/CodeGen/FunctionLoweringInfo.h4
-rw-r--r--llvm/include/llvm/CodeGen/ResourcePriorityQueue.h2
-rw-r--r--llvm/include/llvm/CodeGen/SelectionDAG.h15
-rw-r--r--llvm/include/llvm/DebugInfo/DWARFFormValue.h4
-rw-r--r--llvm/include/llvm/ExecutionEngine/ExecutionEngine.h20
-rw-r--r--llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h2
-rw-r--r--llvm/include/llvm/IR/LegacyPassNameParser.h2
-rw-r--r--llvm/include/llvm/LTO/LTOModule.h6
-rw-r--r--llvm/include/llvm/MC/MCParser/AsmLexer.h2
-rw-r--r--llvm/include/llvm/MC/MCParser/MCAsmParser.h2
-rw-r--r--llvm/include/llvm/MC/MCTargetAsmParser.h4
-rw-r--r--llvm/include/llvm/Object/Archive.h6
-rw-r--r--llvm/include/llvm/Object/COFF.h4
-rw-r--r--llvm/include/llvm/Object/ELF.h28
-rw-r--r--llvm/include/llvm/Object/MachOUniversal.h4
-rw-r--r--llvm/include/llvm/Option/Arg.h6
-rw-r--r--llvm/include/llvm/Option/ArgList.h8
-rw-r--r--llvm/include/llvm/Option/Option.h2
-rw-r--r--llvm/include/llvm/Support/YAMLTraits.h4
-rw-r--r--llvm/include/llvm/Target/TargetIntrinsicInfo.h4
-rw-r--r--llvm/include/llvm/Transforms/Utils/Cloning.h20
-rw-r--r--llvm/include/llvm/Transforms/Utils/ValueMapper.h16
24 files changed, 93 insertions, 92 deletions
diff --git a/llvm/include/llvm/Bitcode/BitstreamReader.h b/llvm/include/llvm/Bitcode/BitstreamReader.h
index fcbf4260441..6f478b72127 100644
--- a/llvm/include/llvm/Bitcode/BitstreamReader.h
+++ b/llvm/include/llvm/Bitcode/BitstreamReader.h
@@ -111,7 +111,7 @@ public:
i != e; ++i)
if (BlockInfoRecords[i].BlockID == BlockID)
return &BlockInfoRecords[i];
- return 0;
+ return nullptr;
}
BlockInfo &getOrCreateBlockInfo(unsigned BlockID) {
@@ -200,9 +200,9 @@ class BitstreamCursor {
public:
- BitstreamCursor() : BitStream(0), NextChar(0) {
- }
- BitstreamCursor(const BitstreamCursor &RHS) : BitStream(0), NextChar(0) {
+ BitstreamCursor() : BitStream(nullptr), NextChar(0) {}
+ BitstreamCursor(const BitstreamCursor &RHS)
+ : BitStream(nullptr), NextChar(0) {
operator=(RHS);
}
@@ -490,7 +490,7 @@ public:
/// EnterSubBlock - Having read the ENTER_SUBBLOCK abbrevid, enter
/// the block, and return true if the block has an error.
- bool EnterSubBlock(unsigned BlockID, unsigned *NumWordsP = 0);
+ bool EnterSubBlock(unsigned BlockID, unsigned *NumWordsP = nullptr);
bool ReadBlockEnd() {
if (BlockScope.empty()) return true;
@@ -541,7 +541,7 @@ public:
void skipRecord(unsigned AbbrevID);
unsigned readRecord(unsigned AbbrevID, SmallVectorImpl<uint64_t> &Vals,
- StringRef *Blob = 0);
+ StringRef *Blob = nullptr);
//===--------------------------------------------------------------------===//
// Abbrev Processing
diff --git a/llvm/include/llvm/Bitcode/BitstreamWriter.h b/llvm/include/llvm/Bitcode/BitstreamWriter.h
index ef88a88a6cd..dcfebd9cc10 100644
--- a/llvm/include/llvm/Bitcode/BitstreamWriter.h
+++ b/llvm/include/llvm/Bitcode/BitstreamWriter.h
@@ -204,7 +204,7 @@ public:
i != e; ++i)
if (BlockInfoRecords[i].BlockID == BlockID)
return &BlockInfoRecords[i];
- return 0;
+ return nullptr;
}
void EnterSubblock(unsigned BlockID, unsigned CodeLen) {
@@ -347,7 +347,7 @@ private:
EmitAbbreviatedField(EltEnc, (unsigned char)BlobData[i]);
// Know that blob data is consumed for assertion below.
- BlobData = 0;
+ BlobData = nullptr;
} else {
// Emit a vbr6 to indicate the number of elements present.
EmitVBR(static_cast<uint32_t>(Vals.size()-RecordIdx), 6);
@@ -378,7 +378,7 @@ private:
WriteByte((unsigned char)BlobData[i]);
// Know that blob data is consumed for assertion below.
- BlobData = 0;
+ BlobData = nullptr;
} else {
for (unsigned e = Vals.size(); RecordIdx != e; ++RecordIdx) {
assert(isUInt<8>(Vals[RecordIdx]) &&
@@ -397,7 +397,7 @@ private:
}
}
assert(RecordIdx == Vals.size() && "Not all record operands emitted!");
- assert(BlobData == 0 &&
+ assert(BlobData == nullptr &&
"Blob data specified for record that doesn't use it!");
}
diff --git a/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h b/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h
index 06e7aaaf22d..9636b51e303 100644
--- a/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h
+++ b/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h
@@ -153,11 +153,11 @@ public:
/// register is a PHI destination and the PHI's LiveOutInfo is not valid.
const LiveOutInfo *GetLiveOutRegInfo(unsigned Reg) {
if (!LiveOutRegInfo.inBounds(Reg))
- return NULL;
+ return nullptr;
const LiveOutInfo *LOI = &LiveOutRegInfo[Reg];
if (!LOI->IsValid)
- return NULL;
+ return nullptr;
return LOI;
}
diff --git a/llvm/include/llvm/CodeGen/ResourcePriorityQueue.h b/llvm/include/llvm/CodeGen/ResourcePriorityQueue.h
index 7ae9111028e..114fe7c35b8 100644
--- a/llvm/include/llvm/CodeGen/ResourcePriorityQueue.h
+++ b/llvm/include/llvm/CodeGen/ResourcePriorityQueue.h
@@ -92,7 +92,7 @@ namespace llvm {
void updateNode(const SUnit *SU) override {}
void releaseState() override {
- SUnits = 0;
+ SUnits = nullptr;
}
unsigned getLatency(unsigned NodeNum) const {
diff --git a/llvm/include/llvm/CodeGen/SelectionDAG.h b/llvm/include/llvm/CodeGen/SelectionDAG.h
index 8819d9d7777..b1e63f29a22 100644
--- a/llvm/include/llvm/CodeGen/SelectionDAG.h
+++ b/llvm/include/llvm/CodeGen/SelectionDAG.h
@@ -578,7 +578,7 @@ public:
Ops.push_back(Op2);
Ops.push_back(InGlue);
return getNode(ISD::CALLSEQ_END, DL, NodeTys, &Ops[0],
- (unsigned)Ops.size() - (InGlue.getNode() == 0 ? 1 : 0));
+ (unsigned)Ops.size() - (InGlue.getNode()==nullptr ? 1 : 0));
}
/// getUNDEF - Return an UNDEF node. UNDEF does not have a useful SDLoc.
@@ -766,14 +766,15 @@ public:
SDValue getLoad(EVT VT, SDLoc dl, SDValue Chain, SDValue Ptr,
MachinePointerInfo PtrInfo, bool isVolatile,
bool isNonTemporal, bool isInvariant, unsigned Alignment,
- const MDNode *TBAAInfo = 0, const MDNode *Ranges = 0);
+ const MDNode *TBAAInfo = nullptr,
+ const MDNode *Ranges = nullptr);
SDValue getLoad(EVT VT, SDLoc dl, SDValue Chain, SDValue Ptr,
MachineMemOperand *MMO);
SDValue getExtLoad(ISD::LoadExtType ExtType, SDLoc dl, EVT VT,
SDValue Chain, SDValue Ptr, MachinePointerInfo PtrInfo,
EVT MemVT, bool isVolatile,
bool isNonTemporal, unsigned Alignment,
- const MDNode *TBAAInfo = 0);
+ const MDNode *TBAAInfo = nullptr);
SDValue getExtLoad(ISD::LoadExtType ExtType, SDLoc dl, EVT VT,
SDValue Chain, SDValue Ptr, EVT MemVT,
MachineMemOperand *MMO);
@@ -784,8 +785,8 @@ public:
SDValue Chain, SDValue Ptr, SDValue Offset,
MachinePointerInfo PtrInfo, EVT MemVT,
bool isVolatile, bool isNonTemporal, bool isInvariant,
- unsigned Alignment, const MDNode *TBAAInfo = 0,
- const MDNode *Ranges = 0);
+ unsigned Alignment, const MDNode *TBAAInfo = nullptr,
+ const MDNode *Ranges = nullptr);
SDValue getLoad(ISD::MemIndexedMode AM, ISD::LoadExtType ExtType,
EVT VT, SDLoc dl,
SDValue Chain, SDValue Ptr, SDValue Offset,
@@ -796,14 +797,14 @@ public:
SDValue getStore(SDValue Chain, SDLoc dl, SDValue Val, SDValue Ptr,
MachinePointerInfo PtrInfo, bool isVolatile,
bool isNonTemporal, unsigned Alignment,
- const MDNode *TBAAInfo = 0);
+ const MDNode *TBAAInfo = nullptr);
SDValue getStore(SDValue Chain, SDLoc dl, SDValue Val, SDValue Ptr,
MachineMemOperand *MMO);
SDValue getTruncStore(SDValue Chain, SDLoc dl, SDValue Val, SDValue Ptr,
MachinePointerInfo PtrInfo, EVT TVT,
bool isNonTemporal, bool isVolatile,
unsigned Alignment,
- const MDNode *TBAAInfo = 0);
+ const MDNode *TBAAInfo = nullptr);
SDValue getTruncStore(SDValue Chain, SDLoc dl, SDValue Val, SDValue Ptr,
EVT TVT, MachineMemOperand *MMO);
SDValue getIndexedStore(SDValue OrigStoe, SDLoc dl, SDValue Base,
diff --git a/llvm/include/llvm/DebugInfo/DWARFFormValue.h b/llvm/include/llvm/DebugInfo/DWARFFormValue.h
index 533d2593b18..d517a72d62e 100644
--- a/llvm/include/llvm/DebugInfo/DWARFFormValue.h
+++ b/llvm/include/llvm/DebugInfo/DWARFFormValue.h
@@ -36,7 +36,7 @@ public:
private:
struct ValueType {
- ValueType() : data(NULL) {
+ ValueType() : data(nullptr) {
uval = 0;
}
@@ -60,7 +60,7 @@ public:
bool extractValue(DataExtractor data, uint32_t *offset_ptr,
const DWARFUnit *u);
bool isInlinedCStr() const {
- return Value.data != NULL && Value.data == (const uint8_t*)Value.cstr;
+ return Value.data != nullptr && Value.data == (const uint8_t*)Value.cstr;
}
/// getAsFoo functions below return the extracted value as Foo if only
diff --git a/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h b/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h
index 4dca870bec7..5bd34e85560 100644
--- a/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h
+++ b/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h
@@ -181,7 +181,7 @@ public:
/// freeMachineCodeForFunction works.
static ExecutionEngine *create(Module *M,
bool ForceInterpreter = false,
- std::string *ErrorStr = 0,
+ std::string *ErrorStr = nullptr,
CodeGenOpt::Level OptLevel =
CodeGenOpt::Default,
bool GVsWithCode = true);
@@ -193,8 +193,8 @@ public:
/// Clients should make sure to initialize targets prior to calling this
/// function.
static ExecutionEngine *createJIT(Module *M,
- std::string *ErrorStr = 0,
- JITMemoryManager *JMM = 0,
+ std::string *ErrorStr = nullptr,
+ JITMemoryManager *JMM = nullptr,
CodeGenOpt::Level OptLevel =
CodeGenOpt::Default,
bool GVsWithCode = true,
@@ -411,7 +411,7 @@ public:
}
// The JIT overrides a version that actually does this.
- virtual void runJITOnFunction(Function *, MachineCodeInfo * = 0) { }
+ virtual void runJITOnFunction(Function *, MachineCodeInfo * = nullptr) { }
/// getGlobalValueAtAddress - Return the LLVM global value object that starts
/// at the specified address.
@@ -478,7 +478,7 @@ public:
}
/// Return the target machine (if available).
- virtual TargetMachine *getTargetMachine() { return NULL; }
+ virtual TargetMachine *getTargetMachine() { return nullptr; }
/// DisableLazyCompilation - When lazy compilation is off (the default), the
/// JIT will eagerly compile every function reachable from the argument to
@@ -576,10 +576,10 @@ private:
/// InitEngine - Does the common initialization of default options.
void InitEngine() {
WhichEngine = EngineKind::Either;
- ErrorStr = NULL;
+ ErrorStr = nullptr;
OptLevel = CodeGenOpt::Default;
- MCJMM = NULL;
- JMM = NULL;
+ MCJMM = nullptr;
+ JMM = nullptr;
Options = TargetOptions();
AllocateGVsWithCode = false;
RelocModel = Reloc::Default;
@@ -610,7 +610,7 @@ public:
/// the setJITMemoryManager() option.
EngineBuilder &setMCJITMemoryManager(RTDyldMemoryManager *mcjmm) {
MCJMM = mcjmm;
- JMM = NULL;
+ JMM = nullptr;
return *this;
}
@@ -622,7 +622,7 @@ public:
/// memory manager. This option defaults to NULL. This option overrides
/// setMCJITMemoryManager() as well.
EngineBuilder &setJITMemoryManager(JITMemoryManager *jmm) {
- MCJMM = NULL;
+ MCJMM = nullptr;
JMM = jmm;
return *this;
}
diff --git a/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h b/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h
index 70dd1cbe714..b1d6810f374 100644
--- a/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h
+++ b/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h
@@ -114,7 +114,7 @@ public:
/// operations needed to reliably use the memory are also performed.
///
/// Returns true if an error occurred, false otherwise.
- virtual bool finalizeMemory(std::string *ErrMsg = 0) = 0;
+ virtual bool finalizeMemory(std::string *ErrMsg = nullptr) = 0;
};
// Create wrappers for C Binding types (see CBindingWrapping.h).
diff --git a/llvm/include/llvm/IR/LegacyPassNameParser.h b/llvm/include/llvm/IR/LegacyPassNameParser.h
index ec8671082dc..b72fc4c1a11 100644
--- a/llvm/include/llvm/IR/LegacyPassNameParser.h
+++ b/llvm/include/llvm/IR/LegacyPassNameParser.h
@@ -73,7 +73,7 @@ public:
if (findOption(P->getPassArgument()) != getNumOptions()) {
errs() << "Two passes with the same argument (-"
<< P->getPassArgument() << ") attempted to be registered!\n";
- llvm_unreachable(0);
+ llvm_unreachable(nullptr);
}
addLiteralOption(P->getPassArgument(), P, P->getPassName());
}
diff --git a/llvm/include/llvm/LTO/LTOModule.h b/llvm/include/llvm/LTO/LTOModule.h
index 1e4fa1b7b22..683985a13c3 100644
--- a/llvm/include/llvm/LTO/LTOModule.h
+++ b/llvm/include/llvm/LTO/LTOModule.h
@@ -129,7 +129,7 @@ public:
const char *getSymbolName(uint32_t index) {
if (index < _symbols.size())
return _symbols[index].name;
- return NULL;
+ return nullptr;
}
/// getDependentLibraryCount - Get the number of dependent libraries
@@ -141,7 +141,7 @@ public:
const char *getDependentLibrary(uint32_t index) {
if (index < _deplibs.size())
return _deplibs[index];
- return NULL;
+ return nullptr;
}
/// getLinkerOptCount - Get the number of linker options
@@ -153,7 +153,7 @@ public:
const char *getLinkerOpt(uint32_t index) {
if (index < _linkeropts.size())
return _linkeropts[index];
- return NULL;
+ return nullptr;
}
/// getLLVVMModule - Return the Module.
diff --git a/llvm/include/llvm/MC/MCParser/AsmLexer.h b/llvm/include/llvm/MC/MCParser/AsmLexer.h
index f36011c9ff9..59b5c09b402 100644
--- a/llvm/include/llvm/MC/MCParser/AsmLexer.h
+++ b/llvm/include/llvm/MC/MCParser/AsmLexer.h
@@ -42,7 +42,7 @@ public:
AsmLexer(const MCAsmInfo &MAI);
~AsmLexer();
- void setBuffer(const MemoryBuffer *buf, const char *ptr = NULL);
+ void setBuffer(const MemoryBuffer *buf, const char *ptr = nullptr);
StringRef LexUntilEndOfStatement() override;
StringRef LexUntilEndOfLine();
diff --git a/llvm/include/llvm/MC/MCParser/MCAsmParser.h b/llvm/include/llvm/MC/MCParser/MCAsmParser.h
index 0389caa0545..f751786a8eb 100644
--- a/llvm/include/llvm/MC/MCParser/MCAsmParser.h
+++ b/llvm/include/llvm/MC/MCParser/MCAsmParser.h
@@ -39,7 +39,7 @@ public:
unsigned Length, Size, Type;
void clear() {
- OpDecl = 0;
+ OpDecl = nullptr;
IsVarDecl = false;
Length = 1;
Size = 0;
diff --git a/llvm/include/llvm/MC/MCTargetAsmParser.h b/llvm/include/llvm/MC/MCTargetAsmParser.h
index 0073136015c..79328bec9f3 100644
--- a/llvm/include/llvm/MC/MCTargetAsmParser.h
+++ b/llvm/include/llvm/MC/MCTargetAsmParser.h
@@ -63,7 +63,7 @@ struct ParseInstructionInfo {
SmallVectorImpl<AsmRewrite> *AsmRewrites;
- ParseInstructionInfo() : AsmRewrites(0) {}
+ ParseInstructionInfo() : AsmRewrites(nullptr) {}
ParseInstructionInfo(SmallVectorImpl<AsmRewrite> *rewrites)
: AsmRewrites(rewrites) {}
@@ -179,7 +179,7 @@ public:
virtual const MCExpr *applyModifierToExpr(const MCExpr *E,
MCSymbolRefExpr::VariantKind,
MCContext &Ctx) {
- return 0;
+ return nullptr;
}
virtual void onLabelParsed(MCSymbol *Symbol) { };
diff --git a/llvm/include/llvm/Object/Archive.h b/llvm/include/llvm/Object/Archive.h
index 4fae76fdd52..a73b13e0503 100644
--- a/llvm/include/llvm/Object/Archive.h
+++ b/llvm/include/llvm/Object/Archive.h
@@ -95,15 +95,15 @@ public:
bool FullPath = false) const;
error_code getAsBinary(OwningPtr<Binary> &Result,
- LLVMContext *Context = 0) const;
+ LLVMContext *Context = nullptr) const;
error_code getAsBinary(std::unique_ptr<Binary> &Result,
- LLVMContext *Context = 0) const;
+ LLVMContext *Context = nullptr) const;
};
class child_iterator {
Child child;
public:
- child_iterator() : child(Child(0, 0)) {}
+ child_iterator() : child(Child(nullptr, nullptr)) {}
child_iterator(const Child &c) : child(c) {}
const Child* operator->() const {
return &child;
diff --git a/llvm/include/llvm/Object/COFF.h b/llvm/include/llvm/Object/COFF.h
index 43dc2c8bda7..bd9c67740df 100644
--- a/llvm/include/llvm/Object/COFF.h
+++ b/llvm/include/llvm/Object/COFF.h
@@ -464,7 +464,7 @@ public:
// The iterator for the import directory table.
class ImportDirectoryEntryRef {
public:
- ImportDirectoryEntryRef() : OwningObject(0) {}
+ ImportDirectoryEntryRef() : OwningObject(nullptr) {}
ImportDirectoryEntryRef(const import_directory_table_entry *Table, uint32_t I,
const COFFObjectFile *Owner)
: ImportTable(Table), Index(I), OwningObject(Owner) {}
@@ -488,7 +488,7 @@ private:
// The iterator for the export directory table entry.
class ExportDirectoryEntryRef {
public:
- ExportDirectoryEntryRef() : OwningObject(0) {}
+ ExportDirectoryEntryRef() : OwningObject(nullptr) {}
ExportDirectoryEntryRef(const export_directory_table_entry *Table, uint32_t I,
const COFFObjectFile *Owner)
: ExportTable(Table), Index(I), OwningObject(Owner) {}
diff --git a/llvm/include/llvm/Object/ELF.h b/llvm/include/llvm/Object/ELF.h
index 765db82ed51..2572a4e279c 100644
--- a/llvm/include/llvm/Object/ELF.h
+++ b/llvm/include/llvm/Object/ELF.h
@@ -604,14 +604,14 @@ typename ELFFile<ELFT>::uintX_t ELFFile<ELFT>::getStringTableIndex() const {
template <class ELFT>
ELFFile<ELFT>::ELFFile(MemoryBuffer *Object, error_code &ec)
: Buf(Object),
- SectionHeaderTable(0),
- dot_shstrtab_sec(0),
- dot_strtab_sec(0),
- dot_symtab_sec(0),
- SymbolTableSectionHeaderIndex(0),
- dot_gnu_version_sec(0),
- dot_gnu_version_r_sec(0),
- dot_gnu_version_d_sec(0),
+ SectionHeaderTable(nullptr),
+ dot_shstrtab_sec(nullptr),
+ dot_strtab_sec(nullptr),
+ dot_symtab_sec(nullptr),
+ SymbolTableSectionHeaderIndex(nullptr),
+ dot_gnu_version_sec(nullptr),
+ dot_gnu_version_r_sec(nullptr),
+ dot_gnu_version_d_sec(nullptr),
dt_soname(nullptr) {
const uint64_t FileSize = Buf->getBufferSize();
@@ -679,19 +679,19 @@ ELFFile<ELFT>::ELFFile(MemoryBuffer *Object, error_code &ec)
DynamicRegion.EntSize = SecI->sh_entsize;
break;
case ELF::SHT_GNU_versym:
- if (dot_gnu_version_sec != NULL)
+ if (dot_gnu_version_sec != nullptr)
// FIXME: Proper error handling.
report_fatal_error("More than one .gnu.version section!");
dot_gnu_version_sec = &*SecI;
break;
case ELF::SHT_GNU_verdef:
- if (dot_gnu_version_d_sec != NULL)
+ if (dot_gnu_version_d_sec != nullptr)
// FIXME: Proper error handling.
report_fatal_error("More than one .gnu.version_d section!");
dot_gnu_version_d_sec = &*SecI;
break;
case ELF::SHT_GNU_verneed:
- if (dot_gnu_version_r_sec != NULL)
+ if (dot_gnu_version_r_sec != nullptr)
// FIXME: Proper error handling.
report_fatal_error("More than one .gnu.version_r section!");
dot_gnu_version_r_sec = &*SecI;
@@ -769,7 +769,7 @@ typename ELFFile<ELFT>::Elf_Sym_Iter ELFFile<ELFT>::begin_symbols() const {
template <class ELFT>
typename ELFFile<ELFT>::Elf_Sym_Iter ELFFile<ELFT>::end_symbols() const {
if (!dot_symtab_sec)
- return Elf_Sym_Iter(0, 0, false);
+ return Elf_Sym_Iter(0, nullptr, false);
return Elf_Sym_Iter(dot_symtab_sec->sh_entsize,
(const char *)base() + dot_symtab_sec->sh_offset +
dot_symtab_sec->sh_size,
@@ -782,14 +782,14 @@ ELFFile<ELFT>::begin_dynamic_table() const {
if (DynamicRegion.Addr)
return Elf_Dyn_Iter(DynamicRegion.EntSize,
(const char *)DynamicRegion.Addr);
- return Elf_Dyn_Iter(0, 0);
+ return Elf_Dyn_Iter(0, nullptr);
}
template <class ELFT>
typename ELFFile<ELFT>::Elf_Dyn_Iter
ELFFile<ELFT>::end_dynamic_table(bool NULLEnd) const {
if (!DynamicRegion.Addr)
- return Elf_Dyn_Iter(0, 0);
+ return Elf_Dyn_Iter(0, nullptr);
Elf_Dyn_Iter Ret(DynamicRegion.EntSize,
(const char *)DynamicRegion.Addr + DynamicRegion.Size);
diff --git a/llvm/include/llvm/Object/MachOUniversal.h b/llvm/include/llvm/Object/MachOUniversal.h
index 9b1afd2072e..da1445fd70a 100644
--- a/llvm/include/llvm/Object/MachOUniversal.h
+++ b/llvm/include/llvm/Object/MachOUniversal.h
@@ -41,7 +41,7 @@ public:
ObjectForArch(const MachOUniversalBinary *Parent, uint32_t Index);
void clear() {
- Parent = 0;
+ Parent = nullptr;
Index = 0;
}
@@ -83,7 +83,7 @@ public:
return ObjectForArch(this, 0);
}
object_iterator end_objects() const {
- return ObjectForArch(0, 0);
+ return ObjectForArch(nullptr, 0);
}
uint32_t getNumberOfObjects() const { return NumberOfObjects; }
diff --git a/llvm/include/llvm/Option/Arg.h b/llvm/include/llvm/Option/Arg.h
index 6b8ed3f7d2b..eee4014a41b 100644
--- a/llvm/include/llvm/Option/Arg.h
+++ b/llvm/include/llvm/Option/Arg.h
@@ -63,11 +63,11 @@ private:
public:
Arg(const Option Opt, StringRef Spelling, unsigned Index,
- const Arg *BaseArg = 0);
+ const Arg *BaseArg = nullptr);
Arg(const Option Opt, StringRef Spelling, unsigned Index,
- const char *Value0, const Arg *BaseArg = 0);
+ const char *Value0, const Arg *BaseArg = nullptr);
Arg(const Option Opt, StringRef Spelling, unsigned Index,
- const char *Value0, const char *Value1, const Arg *BaseArg = 0);
+ const char *Value0, const char *Value1, const Arg *BaseArg = nullptr);
~Arg();
const Option getOption() const { return Opt; }
diff --git a/llvm/include/llvm/Option/ArgList.h b/llvm/include/llvm/Option/ArgList.h
index 98ba6ec10c9..6a51900d069 100644
--- a/llvm/include/llvm/Option/ArgList.h
+++ b/llvm/include/llvm/Option/ArgList.h
@@ -160,16 +160,16 @@ public:
///
/// \p Claim Whether the argument should be claimed, if it exists.
bool hasArgNoClaim(OptSpecifier Id) const {
- return getLastArgNoClaim(Id) != 0;
+ return getLastArgNoClaim(Id) != nullptr;
}
bool hasArg(OptSpecifier Id) const {
- return getLastArg(Id) != 0;
+ return getLastArg(Id) != nullptr;
}
bool hasArg(OptSpecifier Id0, OptSpecifier Id1) const {
- return getLastArg(Id0, Id1) != 0;
+ return getLastArg(Id0, Id1) != nullptr;
}
bool hasArg(OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2) const {
- return getLastArg(Id0, Id1, Id2) != 0;
+ return getLastArg(Id0, Id1, Id2) != nullptr;
}
/// getLastArg - Return the last argument matching \p Id, or null.
diff --git a/llvm/include/llvm/Option/Option.h b/llvm/include/llvm/Option/Option.h
index 03d4774829f..b2cfacbaf34 100644
--- a/llvm/include/llvm/Option/Option.h
+++ b/llvm/include/llvm/Option/Option.h
@@ -73,7 +73,7 @@ public:
~Option();
bool isValid() const {
- return Info != 0;
+ return Info != nullptr;
}
unsigned getID() const {
diff --git a/llvm/include/llvm/Support/YAMLTraits.h b/llvm/include/llvm/Support/YAMLTraits.h
index 97ac0cdf9f5..d736b2637f1 100644
--- a/llvm/include/llvm/Support/YAMLTraits.h
+++ b/llvm/include/llvm/Support/YAMLTraits.h
@@ -194,7 +194,7 @@ struct has_ScalarBitSetTraits
static double test(...);
public:
- static bool const value = (sizeof(test<ScalarBitSetTraits<T> >(0)) == 1);
+ static bool const value = (sizeof(test<ScalarBitSetTraits<T> >(nullptr)) == 1);
};
@@ -778,7 +778,7 @@ struct ScalarTraits<double> {
template <typename TNorm, typename TFinal>
struct MappingNormalization {
MappingNormalization(IO &i_o, TFinal &Obj)
- : io(i_o), BufPtr(NULL), Result(Obj) {
+ : io(i_o), BufPtr(nullptr), Result(Obj) {
if ( io.outputting() ) {
BufPtr = new (&Buffer) TNorm(io, Obj);
}
diff --git a/llvm/include/llvm/Target/TargetIntrinsicInfo.h b/llvm/include/llvm/Target/TargetIntrinsicInfo.h
index ce213496935..6de264e90ef 100644
--- a/llvm/include/llvm/Target/TargetIntrinsicInfo.h
+++ b/llvm/include/llvm/Target/TargetIntrinsicInfo.h
@@ -40,7 +40,7 @@ public:
/// intrinsic, Tys should point to an array of numTys pointers to Type,
/// and must provide exactly one type for each overloaded type in the
/// intrinsic.
- virtual std::string getName(unsigned IID, Type **Tys = 0,
+ virtual std::string getName(unsigned IID, Type **Tys = nullptr,
unsigned numTys = 0) const = 0;
/// Look up target intrinsic by name. Return intrinsic ID or 0 for unknown
@@ -56,7 +56,7 @@ public:
/// Create or insert an LLVM Function declaration for an intrinsic,
/// and return it. The Tys and numTys are for intrinsics with overloaded
/// types. See above for more information.
- virtual Function *getDeclaration(Module *M, unsigned ID, Type **Tys = 0,
+ virtual Function *getDeclaration(Module *M, unsigned ID, Type **Tys = nullptr,
unsigned numTys = 0) const = 0;
};
diff --git a/llvm/include/llvm/Transforms/Utils/Cloning.h b/llvm/include/llvm/Transforms/Utils/Cloning.h
index 96c650834aa..03e156ed4be 100644
--- a/llvm/include/llvm/Transforms/Utils/Cloning.h
+++ b/llvm/include/llvm/Transforms/Utils/Cloning.h
@@ -96,8 +96,8 @@ struct ClonedCodeInfo {
///
BasicBlock *CloneBasicBlock(const BasicBlock *BB,
ValueToValueMapTy &VMap,
- const Twine &NameSuffix = "", Function *F = 0,
- ClonedCodeInfo *CodeInfo = 0);
+ const Twine &NameSuffix = "", Function *F = nullptr,
+ ClonedCodeInfo *CodeInfo = nullptr);
/// CloneFunction - Return a copy of the specified function, but without
/// embedding the function into another module. Also, any references specified
@@ -114,7 +114,7 @@ BasicBlock *CloneBasicBlock(const BasicBlock *BB,
Function *CloneFunction(const Function *F,
ValueToValueMapTy &VMap,
bool ModuleLevelChanges,
- ClonedCodeInfo *CodeInfo = 0);
+ ClonedCodeInfo *CodeInfo = nullptr);
/// Clone OldFunc into NewFunc, transforming the old arguments into references
/// to VMap values. Note that if NewFunc already has basic blocks, the ones
@@ -130,9 +130,9 @@ void CloneFunctionInto(Function *NewFunc, const Function *OldFunc,
bool ModuleLevelChanges,
SmallVectorImpl<ReturnInst*> &Returns,
const char *NameSuffix = "",
- ClonedCodeInfo *CodeInfo = 0,
- ValueMapTypeRemapper *TypeMapper = 0,
- ValueMaterializer *Materializer = 0);
+ ClonedCodeInfo *CodeInfo = nullptr,
+ ValueMapTypeRemapper *TypeMapper = nullptr,
+ ValueMaterializer *Materializer = nullptr);
/// CloneAndPruneFunctionInto - This works exactly like CloneFunctionInto,
/// except that it does some simple constant prop and DCE on the fly. The
@@ -150,16 +150,16 @@ void CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc,
bool ModuleLevelChanges,
SmallVectorImpl<ReturnInst*> &Returns,
const char *NameSuffix = "",
- ClonedCodeInfo *CodeInfo = 0,
- const DataLayout *DL = 0,
- Instruction *TheCall = 0);
+ ClonedCodeInfo *CodeInfo = nullptr,
+ const DataLayout *DL = nullptr,
+ Instruction *TheCall = nullptr);
/// InlineFunctionInfo - This class captures the data input to the
/// InlineFunction call, and records the auxiliary results produced by it.
class InlineFunctionInfo {
public:
- explicit InlineFunctionInfo(CallGraph *cg = 0, const DataLayout *DL = 0)
+ explicit InlineFunctionInfo(CallGraph *cg = nullptr, const DataLayout *DL = nullptr)
: CG(cg), DL(DL) {}
/// CG - If non-null, InlineFunction will update the callgraph to reflect the
diff --git a/llvm/include/llvm/Transforms/Utils/ValueMapper.h b/llvm/include/llvm/Transforms/Utils/ValueMapper.h
index e96610e76af..33578bbcf22 100644
--- a/llvm/include/llvm/Transforms/Utils/ValueMapper.h
+++ b/llvm/include/llvm/Transforms/Utils/ValueMapper.h
@@ -68,27 +68,27 @@ namespace llvm {
Value *MapValue(const Value *V, ValueToValueMapTy &VM,
RemapFlags Flags = RF_None,
- ValueMapTypeRemapper *TypeMapper = 0,
- ValueMaterializer *Materializer = 0);
+ ValueMapTypeRemapper *TypeMapper = nullptr,
+ ValueMaterializer *Materializer = nullptr);
void RemapInstruction(Instruction *I, ValueToValueMapTy &VM,
RemapFlags Flags = RF_None,
- ValueMapTypeRemapper *TypeMapper = 0,
- ValueMaterializer *Materializer = 0);
+ ValueMapTypeRemapper *TypeMapper = nullptr,
+ ValueMaterializer *Materializer = nullptr);
/// MapValue - provide versions that preserve type safety for MDNode and
/// Constants.
inline MDNode *MapValue(const MDNode *V, ValueToValueMapTy &VM,
RemapFlags Flags = RF_None,
- ValueMapTypeRemapper *TypeMapper = 0,
- ValueMaterializer *Materializer = 0) {
+ ValueMapTypeRemapper *TypeMapper = nullptr,
+ ValueMaterializer *Materializer = nullptr) {
return cast<MDNode>(MapValue((const Value*)V, VM, Flags, TypeMapper,
Materializer));
}
inline Constant *MapValue(const Constant *V, ValueToValueMapTy &VM,
RemapFlags Flags = RF_None,
- ValueMapTypeRemapper *TypeMapper = 0,
- ValueMaterializer *Materializer = 0) {
+ ValueMapTypeRemapper *TypeMapper = nullptr,
+ ValueMaterializer *Materializer = nullptr) {
return cast<Constant>(MapValue((const Value*)V, VM, Flags, TypeMapper,
Materializer));
}
OpenPOWER on IntegriCloud