LCOV - code coverage report
Current view: top level - include/llvm/WindowsManifest - WindowsManifestMerger.h (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 0 1 0.0 %
Date: 2017-09-14 15:23:50 Functions: 0 2 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //===-- WindowsManifestMerger.h ---------------------------------*- C++-*-===//
       2             : //
       3             : //                     The LLVM Compiler Infrastructure
       4             : //
       5             : // This file is distributed under the University of Illinois Open Source
       6             : // License. See LICENSE.TXT for details.
       7             : //
       8             : //===---------------------------------------------------------------------===//
       9             : //
      10             : // This file provides a utility for merging Microsoft .manifest files.  These
      11             : // files are xml documents which contain meta-information about applications,
      12             : // such as whether or not admin access is required, system compatibility,
      13             : // versions, etc.  Part of the linking process of an executable may require
      14             : // merging several of these .manifest files using a tree-merge following
      15             : // specific rules.  Unfortunately, these rules are not documented well
      16             : // anywhere.  However, a careful investigation of the behavior of the original
      17             : // Microsoft Manifest Tool (mt.exe) revealed the rules of this merge.  As the
      18             : // saying goes, code is the best documentation, so please look below if you are
      19             : // interested in the exact merging requirements.
      20             : //
      21             : // Ref:
      22             : // https://msdn.microsoft.com/en-us/library/windows/desktop/aa374191(v=vs.85).aspx
      23             : //
      24             : //===---------------------------------------------------------------------===//
      25             : 
      26             : #ifndef LLVM_INCLUDE_LLVM_SUPPORT_WINDOWS_MANIFEST_MERGER_H
      27             : #define LLVM_INCLUDE_LLVM_SUPPORT_WINDOWS_MANIFEST_MERGER_H
      28             : 
      29             : #include "llvm/Config/config.h"
      30             : #include "llvm/Support/Error.h"
      31             : 
      32             : namespace llvm {
      33             : 
      34             : class MemoryBuffer;
      35             : 
      36             : namespace windows_manifest {
      37             : 
      38             : bool isAvailable();
      39             : 
      40           0 : class WindowsManifestError : public ErrorInfo<WindowsManifestError, ECError> {
      41             : public:
      42             :   static char ID;
      43             :   WindowsManifestError(const Twine &Msg);
      44             :   void log(raw_ostream &OS) const override;
      45             : 
      46             : private:
      47             :   std::string Msg;
      48             : };
      49             : 
      50             : class WindowsManifestMerger {
      51             : public:
      52             :   WindowsManifestMerger();
      53             :   ~WindowsManifestMerger();
      54             :   Error merge(const MemoryBuffer &Manifest);
      55             : 
      56             :   // Returns vector containing merged xml manifest, or uninitialized vector for
      57             :   // empty manifest.
      58             :   std::unique_ptr<MemoryBuffer> getMergedManifest();
      59             : 
      60             : private:
      61             :   class WindowsManifestMergerImpl;
      62             :   std::unique_ptr<WindowsManifestMergerImpl> Impl;
      63             : };
      64             : 
      65             : } // namespace windows_manifest
      66             : } // namespace llvm
      67             : #endif

Generated by: LCOV version 1.13