Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/MC/MCNullStreamer.cpp
Line
Count
Source (jump to first uncovered line)
1
//===- lib/MC/MCNullStreamer.cpp - Dummy Streamer Implementation ----------===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#include "llvm/ADT/StringRef.h"
10
#include "llvm/MC/MCInst.h"
11
#include "llvm/MC/MCStreamer.h"
12
#include "llvm/MC/MCSymbol.h"
13
14
using namespace llvm;
15
16
namespace {
17
18
  class MCNullStreamer : public MCStreamer {
19
  public:
20
240
    MCNullStreamer(MCContext &Context) : MCStreamer(Context) {}
21
22
    /// @name MCStreamer Interface
23
    /// @{
24
25
21
    bool hasRawTextSupport() const override { return true; }
26
1
    void EmitRawTextImpl(StringRef String) override {}
27
28
    bool EmitSymbolAttribute(MCSymbol *Symbol,
29
32
                             MCSymbolAttr Attribute) override {
30
32
      return true;
31
32
    }
32
33
    void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
34
0
                          unsigned ByteAlignment) override {}
35
    void EmitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
36
                      uint64_t Size = 0, unsigned ByteAlignment = 0,
37
0
                      SMLoc Loc = SMLoc()) override {}
38
0
    void EmitGPRel32Value(const MCExpr *Value) override {}
39
5
    void BeginCOFFSymbolDef(const MCSymbol *Symbol) override {}
40
5
    void EmitCOFFSymbolStorageClass(int StorageClass) override {}
41
5
    void EmitCOFFSymbolType(int Type) override {}
42
5
    void EndCOFFSymbolDef() override {}
43
  };
44
45
}
46
47
240
MCStreamer *llvm::createNullStreamer(MCContext &Context) {
48
240
  return new MCNullStreamer(Context);
49
240
}