diff options
Diffstat (limited to 'lib/ReaderWriter/PECOFF/PDBPass.h')
-rw-r--r-- | lib/ReaderWriter/PECOFF/PDBPass.h | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/lib/ReaderWriter/PECOFF/PDBPass.h b/lib/ReaderWriter/PECOFF/PDBPass.h deleted file mode 100644 index 0efa054db823..000000000000 --- a/lib/ReaderWriter/PECOFF/PDBPass.h +++ /dev/null @@ -1,43 +0,0 @@ -//===- lib/ReaderWriter/PECOFF/PDBPass.h ----------------------------------===// -// -// The LLVM Linker -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLD_READER_WRITER_PE_COFF_PDB_PASS_H -#define LLD_READER_WRITER_PE_COFF_PDB_PASS_H - -#include "lld/Core/Pass.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/Support/Process.h" - -namespace lld { -namespace pecoff { - -class PDBPass : public lld::Pass { -public: - PDBPass(PECOFFLinkingContext &ctx) : _ctx(ctx) {} - - void perform(std::unique_ptr<MutableFile> &file) override { - if (_ctx.getDebug()) - touch(_ctx.getPDBFilePath()); - } - -private: - void touch(StringRef path) { - int fd; - if (llvm::sys::fs::openFileForWrite(path, fd, llvm::sys::fs::F_Append)) - llvm::report_fatal_error("failed to create a PDB file"); - llvm::sys::Process::SafelyCloseFileDescriptor(fd); - } - - PECOFFLinkingContext &_ctx; -}; - -} // namespace pecoff -} // namespace lld - -#endif |