diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-04-13 04:57:38 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-04-13 04:57:38 +0000 |
commit | bb694de64964b4026ca1fb2ec2dcb5023d4923ac (patch) | |
tree | e6172ee81777598ab71087d900e2039987a18981 /llvm/lib/MC/MCContext.cpp | |
parent | 9e2f0a4f628b2cefb9a234c3c66f820bdbc966fc (diff) | |
download | llvm-bb694de64964b4026ca1fb2ec2dcb5023d4923ac.zip llvm-bb694de64964b4026ca1fb2ec2dcb5023d4923ac.tar.gz llvm-bb694de64964b4026ca1fb2ec2dcb5023d4923ac.tar.bz2 |
[C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr.
llvm-svn: 206129
Diffstat (limited to 'llvm/lib/MC/MCContext.cpp')
-rw-r--r-- | llvm/lib/MC/MCContext.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp index 4152d63..6f0c391 100644 --- a/llvm/lib/MC/MCContext.cpp +++ b/llvm/lib/MC/MCContext.cpp @@ -44,7 +44,7 @@ MCContext::MCContext(const MCAsmInfo *mai, const MCRegisterInfo *mri, CompilationDir.clear(); SecureLogFile = getenv("AS_SECURE_LOG_FILE"); - SecureLog = 0; + SecureLog = nullptr; SecureLogUsed = false; if (SrcMgr && SrcMgr->getNumBuffers() > 0) @@ -250,7 +250,7 @@ getELFSection(StringRef Section, unsigned Type, unsigned Flags, SectionKind Kind, unsigned EntrySize, StringRef Group) { // Do the lookup, if we have a hit, return it. auto IterBool = ELFUniquingMap.insert( - std::make_pair(SectionGroupPair(Section, Group), (MCSectionELF *)0)); + std::make_pair(SectionGroupPair(Section, Group), nullptr)); auto &Entry = *IterBool.first; if (!IterBool.second) return Entry.second; @@ -259,7 +259,7 @@ getELFSection(StringRef Section, unsigned Type, unsigned Flags, EntrySize = MCSectionELF::DetermineEntrySize(Kind); } - MCSymbol *GroupSym = NULL; + MCSymbol *GroupSym = nullptr; if (!Group.empty()) GroupSym = GetOrCreateSymbol(Group); @@ -273,7 +273,7 @@ getELFSection(StringRef Section, unsigned Type, unsigned Flags, const MCSectionELF *MCContext::CreateELFGroupSection() { MCSectionELF *Result = new (*this) MCSectionELF(".group", ELF::SHT_GROUP, 0, - SectionKind::getReadOnly(), 4, NULL); + SectionKind::getReadOnly(), 4, nullptr); return Result; } @@ -284,12 +284,12 @@ MCContext::getCOFFSection(StringRef Section, unsigned Characteristics, // Do the lookup, if we have a hit, return it. SectionGroupPair P(Section, COMDATSymName); - auto IterBool = COFFUniquingMap.insert(std::make_pair(P, (MCSectionCOFF *)0)); + auto IterBool = COFFUniquingMap.insert(std::make_pair(P, nullptr)); auto Iter = IterBool.first; if (!IterBool.second) return Iter->second; - const MCSymbol *COMDATSymbol = NULL; + const MCSymbol *COMDATSymbol = nullptr; if (!COMDATSymName.empty()) COMDATSymbol = GetOrCreateSymbol(COMDATSymName); @@ -311,7 +311,7 @@ const MCSectionCOFF *MCContext::getCOFFSection(StringRef Section) { SectionGroupPair P(Section, ""); auto Iter = COFFUniquingMap.find(P); if (Iter == COFFUniquingMap.end()) - return 0; + return nullptr; return Iter->second; } |