LCOV - code coverage report
Current view: top level - lib/MC/MCDisassembler - MCDisassembler.cpp (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 12 12 100.0 %
Date: 2018-10-20 13:21:21 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     2157942 : bool MCDisassembler::tryAddingSymbolicOperand(MCInst &Inst, int64_t Value,
      19             :                                               uint64_t Address, bool IsBranch,
      20             :                                               uint64_t Offset,
      21             :                                               uint64_t InstSize) const {
      22     2157942 :   raw_ostream &cStream = CommentStream ? *CommentStream : nulls();
      23     2157942 :   if (Symbolizer)
      24         991 :     return Symbolizer->tryAddingSymbolicOperand(Inst, cStream, Value, Address,
      25         991 :                                                 IsBranch, Offset, InstSize);
      26             :   return false;
      27             : }
      28             : 
      29      212787 : void MCDisassembler::tryAddingPcLoadReferenceComment(int64_t Value,
      30             :                                                      uint64_t Address) const {
      31      212787 :   raw_ostream &cStream = CommentStream ? *CommentStream : nulls();
      32      212787 :   if (Symbolizer)
      33          21 :     Symbolizer->tryAddingPcLoadReferenceComment(cStream, Value, Address);
      34      212787 : }
      35             : 
      36          87 : void MCDisassembler::setSymbolizer(std::unique_ptr<MCSymbolizer> Symzer) {
      37             :   Symbolizer = std::move(Symzer);
      38          87 : }

Generated by: LCOV version 1.13