Coverage Report

Created: 2017-10-03 07:32

/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h
Line
Count
Source
1
//===-- BPFMCAsmInfo.h - BPF asm properties -------------------*- 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 contains the declaration of the BPFMCAsmInfo class.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCASMINFO_H
15
#define LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCASMINFO_H
16
17
#include "llvm/ADT/Triple.h"
18
#include "llvm/MC/MCAsmInfo.h"
19
20
namespace llvm {
21
class Target;
22
23
class BPFMCAsmInfo : public MCAsmInfo {
24
public:
25
59
  explicit BPFMCAsmInfo(const Triple &TT) {
26
59
    if (TT.getArch() == Triple::bpfeb)
27
12
      IsLittleEndian = false;
28
59
29
59
    PrivateGlobalPrefix = ".L";
30
59
    WeakRefDirective = "\t.weak\t";
31
59
32
59
    UsesELFSectionDirectiveForBSS = true;
33
59
    HasSingleParameterDotFile = false;
34
59
    HasDotTypeDotSizeDirective = false;
35
59
36
59
    SupportsDebugInformation = true;
37
59
    ExceptionsType = ExceptionHandling::DwarfCFI;
38
59
    MinInstAlignment = 8;
39
59
40
59
    // the default is 4 and it only affects dwarf elf output
41
59
    // so if not set correctly, the dwarf data will be
42
59
    // messed up in random places by 4 bytes. .debug_line
43
59
    // section will be parsable, but with odd offsets and
44
59
    // line numbers, etc.
45
59
    CodePointerSize = 8;
46
59
  }
47
};
48
}
49
50
#endif