LCOV - code coverage report
Current view: top level - lib/MC/MCDisassembler - MCDisassembler.cpp (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 13 13 100.0 %
Date: 2017-09-14 15:23:50 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //===- MCDisassembler.cpp - Disassembler interface ------------------------===//
       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             : #include "llvm/MC/MCDisassembler/MCDisassembler.h"
      11             : #include "llvm/Support/raw_ostream.h"
      12             : #include <algorithm>
      13             : 
      14             : using namespace llvm;
      15             : 
      16             : MCDisassembler::~MCDisassembler() = default;
      17             : 
      18     2156231 : bool MCDisassembler::tryAddingSymbolicOperand(MCInst &Inst, int64_t Value,
      19             :                                               uint64_t Address, bool IsBranch,
      20             :                                               uint64_t Offset,
      21             :                                               uint64_t InstSize) const {
      22     2156231 :   raw_ostream &cStream = CommentStream ? *CommentStream : nulls();
      23     4312462 :   if (Symbolizer)
      24        3177 :     return Symbolizer->tryAddingSymbolicOperand(Inst, cStream, Value, Address,
      25        2118 :                                                 IsBranch, Offset, InstSize);
      26             :   return false;
      27             : }
      28             : 
      29      212698 : void MCDisassembler::tryAddingPcLoadReferenceComment(int64_t Value,
      30             :                                                      uint64_t Address) const {
      31      212698 :   raw_ostream &cStream = CommentStream ? *CommentStream : nulls();
      32      425396 :   if (Symbolizer)
      33          42 :     Symbolizer->tryAddingPcLoadReferenceComment(cStream, Value, Address);
      34      212698 : }
      35             : 
      36         147 : void MCDisassembler::setSymbolizer(std::unique_ptr<MCSymbolizer> Symzer) {
      37         294 :   Symbolizer = std::move(Symzer);
      38         147 : }

Generated by: LCOV version 1.13