diff options
| author | Hans Wennborg <hans@hanshq.net> | 2015-10-06 23:24:35 +0000 |
|---|---|---|
| committer | Hans Wennborg <hans@hanshq.net> | 2015-10-06 23:24:35 +0000 |
| commit | 083ca9bb3233fb4df575bfb8c4198e3f9d6e3acd (patch) | |
| tree | 81cfb3fc70e644d0ab252b18b9fabf6b764da86a /llvm/lib/MC | |
| parent | 44780acd913643391779768c0b1d9259e294dbe8 (diff) | |
| download | bcm5719-llvm-083ca9bb3233fb4df575bfb8c4198e3f9d6e3acd.tar.gz bcm5719-llvm-083ca9bb3233fb4df575bfb8c4198e3f9d6e3acd.zip | |
Fix Clang-tidy modernize-use-nullptr warnings in source directories and generated files; other minor cleanups.
Patch by Eugene Zelenko!
Differential Revision: http://reviews.llvm.org/D13321
llvm-svn: 249482
Diffstat (limited to 'llvm/lib/MC')
| -rw-r--r-- | llvm/lib/MC/MCDwarf.cpp | 8 | ||||
| -rw-r--r-- | llvm/lib/MC/MCObjectFileInfo.cpp | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp index 9ab8319f4c8..58cf652b68f 100644 --- a/llvm/lib/MC/MCDwarf.cpp +++ b/llvm/lib/MC/MCDwarf.cpp @@ -27,6 +27,7 @@ #include "llvm/Support/Path.h" #include "llvm/Support/SourceMgr.h" #include "llvm/Support/raw_ostream.h" + using namespace llvm; static inline uint64_t ScaleAddrDelta(MCContext &Context, uint64_t AddrDelta) { @@ -244,7 +245,6 @@ static void emitAbsValue(MCStreamer &OS, const MCExpr *Value, unsigned Size) { std::pair<MCSymbol *, MCSymbol *> MCDwarfLineTableHeader::Emit(MCStreamer *MCOS, MCDwarfLineTableParams Params, ArrayRef<char> StandardOpcodeLengths) const { - MCContext &context = MCOS->getContext(); // Create a symbol at the beginning of the line table. @@ -842,7 +842,7 @@ void MCGenDwarfInfo::Emit(MCStreamer *MCOS) { LineSectionSymbol = MCOS->getDwarfLineTableSymbol(0); MCSymbol *AbbrevSectionSymbol = nullptr; MCSymbol *InfoSectionSymbol = nullptr; - MCSymbol *RangesSectionSymbol = NULL; + MCSymbol *RangesSectionSymbol = nullptr; // Create end symbols for each section, and remove empty sections MCOS->getContext().finalizeDwarfSections(*MCOS); @@ -1458,7 +1458,7 @@ namespace { bool IsSignalFrame; bool IsSimple; }; -} +} // anonymous namespace namespace llvm { template <> @@ -1485,7 +1485,7 @@ namespace llvm { LHS.IsSimple == RHS.IsSimple; } }; -} +} // namespace llvm void MCDwarfFrameEmitter::Emit(MCObjectStreamer &Streamer, MCAsmBackend *MAB, bool IsEH) { diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index 21adc6f5f74..31091ef284a 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -17,6 +17,7 @@ #include "llvm/MC/MCSectionELF.h" #include "llvm/MC/MCSectionMachO.h" #include "llvm/Support/COFF.h" + using namespace llvm; static bool useCompactUnwind(const Triple &T) { @@ -259,7 +260,6 @@ void MCObjectFileInfo::initELFMCObjectFileInfo(Triple T) { FDECFIEncoding = dwarf::DW_EH_PE_pcrel | ((CMModel == CodeModel::Large) ? dwarf::DW_EH_PE_sdata8 : dwarf::DW_EH_PE_sdata4); - break; default: FDECFIEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4; @@ -577,7 +577,7 @@ void MCObjectFileInfo::initCOFFMCObjectFileInfo(Triple T) { assert(T.isOSWindows() && "Windows is the only supported COFF target"); if (T.getArch() == Triple::x86_64) { // On Windows 64 with SEH, the LSDA is emitted into the .xdata section - LSDASection = 0; + LSDASection = nullptr; } else { LSDASection = Ctx->getCOFFSection(".gcc_except_table", COFF::IMAGE_SCN_CNT_INITIALIZED_DATA | |

