From 9c53b2adc8c032f025ad871c8f9a0aeaf23453a8 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 6 Dec 2020 15:36:39 -0800 Subject: [PATCH] [MC] Delete unused declarations Notes: * llvm::createAsmStreamer: it has been moved to TargetRegistry.h * (anon ns)::WasmObjectWriter::updateCustomSectionRelocations: remnant of D46335 * COFFAsmParser::ParseSEHRegisterNumber: remnant of D66625 * llvm::CodeViewContext::isValidCVFileNumber: accidentally added by r279847 --- llvm/include/llvm/MC/MCCodeView.h | 2 -- llvm/include/llvm/MC/MCMachObjectWriter.h | 10 ---------- llvm/include/llvm/MC/MCStreamer.h | 22 ---------------------- llvm/lib/MC/MCParser/COFFAsmParser.cpp | 1 - llvm/lib/MC/MCParser/MasmParser.cpp | 2 -- llvm/lib/MC/WasmObjectWriter.cpp | 3 --- 6 files changed, 40 deletions(-) diff --git a/llvm/include/llvm/MC/MCCodeView.h b/llvm/include/llvm/MC/MCCodeView.h index 2126354..5770f37 100644 --- a/llvm/include/llvm/MC/MCCodeView.h +++ b/llvm/include/llvm/MC/MCCodeView.h @@ -166,8 +166,6 @@ public: unsigned FileNo, unsigned Line, unsigned Column, bool PrologueEnd, bool IsStmt); - bool isValidCVFileNumber(unsigned FileNumber); - /// Add a line entry. void addLineEntry(const MCCVLoc &LineEntry); diff --git a/llvm/include/llvm/MC/MCMachObjectWriter.h b/llvm/include/llvm/MC/MCMachObjectWriter.h index 6cdccd4..f4f9c47 100644 --- a/llvm/include/llvm/MC/MCMachObjectWriter.h +++ b/llvm/include/llvm/MC/MCMachObjectWriter.h @@ -235,16 +235,6 @@ public: Relocations[Sec].push_back(P); } - void recordScatteredRelocation(const MCAssembler &Asm, - const MCAsmLayout &Layout, - const MCFragment *Fragment, - const MCFixup &Fixup, MCValue Target, - unsigned Log2Size, uint64_t &FixedValue); - - void recordTLVPRelocation(const MCAssembler &Asm, const MCAsmLayout &Layout, - const MCFragment *Fragment, const MCFixup &Fixup, - MCValue Target, uint64_t &FixedValue); - void recordRelocation(MCAssembler &Asm, const MCAsmLayout &Layout, const MCFragment *Fragment, const MCFixup &Fixup, MCValue Target, uint64_t &FixedValue) override; diff --git a/llvm/include/llvm/MC/MCStreamer.h b/llvm/include/llvm/MC/MCStreamer.h index 9581a08..bb533bc 100644 --- a/llvm/include/llvm/MC/MCStreamer.h +++ b/llvm/include/llvm/MC/MCStreamer.h @@ -1080,28 +1080,6 @@ public: /// timing the assembler front end. MCStreamer *createNullStreamer(MCContext &Ctx); -/// Create a machine code streamer which will print out assembly for the native -/// target, suitable for compiling with a native assembler. -/// -/// \param InstPrint - If given, the instruction printer to use. If not given -/// the MCInst representation will be printed. This method takes ownership of -/// InstPrint. -/// -/// \param CE - If given, a code emitter to use to show the instruction -/// encoding inline with the assembly. This method takes ownership of \p CE. -/// -/// \param TAB - If given, a target asm backend to use to show the fixup -/// information in conjunction with encoding information. This method takes -/// ownership of \p TAB. -/// -/// \param ShowInst - Whether to show the MCInst representation inline with -/// the assembly. -MCStreamer *createAsmStreamer(MCContext &Ctx, - std::unique_ptr OS, - bool isVerboseAsm, bool useDwarfDirectory, - MCInstPrinter *InstPrint, MCCodeEmitter *CE, - MCAsmBackend *TAB, bool ShowInst); - } // end namespace llvm #endif // LLVM_MC_MCSTREAMER_H diff --git a/llvm/lib/MC/MCParser/COFFAsmParser.cpp b/llvm/lib/MC/MCParser/COFFAsmParser.cpp index 1d966ff..3ac6a88 100644 --- a/llvm/lib/MC/MCParser/COFFAsmParser.cpp +++ b/llvm/lib/MC/MCParser/COFFAsmParser.cpp @@ -142,7 +142,6 @@ class COFFAsmParser : public MCAsmParserExtension { bool ParseSEHDirectiveEndProlog(StringRef, SMLoc); bool ParseAtUnwindOrAtExcept(bool &unwind, bool &except); - bool ParseSEHRegisterNumber(unsigned &RegNo); bool ParseDirectiveSymbolAttribute(StringRef Directive, SMLoc); public: diff --git a/llvm/lib/MC/MCParser/MasmParser.cpp b/llvm/lib/MC/MCParser/MasmParser.cpp index 63aebbc..e5d8039 100644 --- a/llvm/lib/MC/MCParser/MasmParser.cpp +++ b/llvm/lib/MC/MCParser/MasmParser.cpp @@ -783,8 +783,6 @@ private: /// def_range types parsed by this class. StringMap CVDefRangeTypeMap; - bool parseInitValue(unsigned Size); - // ".ascii", ".asciz", ".string" bool parseDirectiveAscii(StringRef IDVal, bool ZeroTerminated); diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp index a05d4c9..ab520dd 100644 --- a/llvm/lib/MC/WasmObjectWriter.cpp +++ b/llvm/lib/MC/WasmObjectWriter.cpp @@ -328,9 +328,6 @@ private: void writeCustomSection(WasmCustomSection &CustomSection, const MCAssembler &Asm, const MCAsmLayout &Layout); void writeCustomRelocSections(); - void - updateCustomSectionRelocations(const SmallVector &Functions, - const MCAsmLayout &Layout); uint64_t getProvisionalValue(const WasmRelocationEntry &RelEntry, const MCAsmLayout &Layout); -- 2.7.4