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

          Line data    Source code
       1             : //===-- AMDGPUHSATargetObjectFile.cpp - AMDGPU Object Files ---------------===//
       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 "AMDGPUTargetObjectFile.h"
      11             : #include "AMDGPU.h"
      12             : #include "AMDGPUTargetMachine.h"
      13             : #include "Utils/AMDGPUBaseInfo.h"
      14             : #include "llvm/BinaryFormat/ELF.h"
      15             : #include "llvm/MC/MCContext.h"
      16             : #include "llvm/MC/MCSectionELF.h"
      17             : 
      18             : using namespace llvm;
      19             : 
      20             : //===----------------------------------------------------------------------===//
      21             : // Generic Object File
      22             : //===----------------------------------------------------------------------===//
      23             : 
      24       16960 : MCSection *AMDGPUTargetObjectFile::SelectSectionForGlobal(
      25             :     const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const {
      26       16960 :   auto AS = static_cast<const AMDGPUTargetMachine*>(&TM)->getAMDGPUAS();
      27          74 :   if (Kind.isReadOnly() && AMDGPU::isReadOnlySegment(GO, AS) &&
      28          37 :       AMDGPU::shouldEmitConstantsToTextSection(TM.getTargetTriple()))
      29          33 :     return TextSection;
      30             : 
      31       16927 :   return TargetLoweringObjectFileELF::SelectSectionForGlobal(GO, Kind, TM);
      32             : }

Generated by: LCOV version 1.13