zcov: / lib/Driver/Action.cpp


Files: 1 Branches Taken: 62.5% 10 / 16
Generated: 2010-02-10 01:31 Branches Executed: 75.0% 12 / 16
Line Coverage: 97.9% 46 / 47


Programs: 2 Runs 3018


       1                 : //===--- Action.cpp - Abstract compilation steps ------------------------*-===//
       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 "clang/Driver/Action.h"
      11                 : 
      12                 : #include <cassert>
      13                 : using namespace clang::driver;
      14                 : 
      15              235: Action::~Action() {
      16                 :   // FIXME: Free the inputs. The problem is that BindArchAction shares
      17                 :   // inputs; so we can't just walk the inputs.
                        0: branch 1 not taken
                        0: branch 2 not taken
                        0: branch 5 not taken
                        0: branch 6 not taken
                        0: branch 9 not taken
                      235: branch 10 taken
      18              235: }
      19                 : 
      20               81: const char *Action::getClassName(ActionClass AC) {
                       22: branch 0 taken
                        9: branch 1 taken
                       15: branch 2 taken
                        1: branch 3 taken
                        1: branch 4 taken
                       12: branch 5 taken
                       16: branch 6 taken
                        3: branch 7 taken
                        2: branch 8 taken
                        0: branch 9 not taken
      21               81:   switch (AC) {
      22               22:   case InputClass: return "input";
      23                9:   case BindArchClass: return "bind-arch";
      24               15:   case PreprocessJobClass: return "preprocessor";
      25                1:   case PrecompileJobClass: return "precompiler";
      26                1:   case AnalyzeJobClass: return "analyzer";
      27               12:   case CompileJobClass: return "compiler";
      28               16:   case AssembleJobClass: return "assembler";
      29                3:   case LinkJobClass: return "linker";
      30                2:   case LipoJobClass: return "lipo";
      31                 :   }
      32                 : 
      33                0:   assert(0 && "invalid class");
      34                 :   return 0;
      35                 : }
      36                 : 
      37              241: InputAction::InputAction(const Arg &_Input, types::ID _Type)
      38              241:   : Action(InputClass, _Type), Input(_Input) {
      39              241: }
      40                 : 
      41               62: BindArchAction::BindArchAction(Action *Input, const char *_ArchName)
      42               62:   : Action(BindArchClass, Input, Input->getType()), ArchName(_ArchName) {
      43               62: }
      44                 : 
      45              422: JobAction::JobAction(ActionClass Kind, Action *Input, types::ID Type)
      46              422:   : Action(Kind, Input, Type) {
      47              422: }
      48                 : 
      49               35: JobAction::JobAction(ActionClass Kind, const ActionList &Inputs, types::ID Type)
      50               35:   : Action(Kind, Inputs, Type) {
      51               35: }
      52                 : 
      53              213: PreprocessJobAction::PreprocessJobAction(Action *Input, types::ID OutputType)
      54              213:   : JobAction(PreprocessJobClass, Input, OutputType) {
      55              213: }
      56                 : 
      57                6: PrecompileJobAction::PrecompileJobAction(Action *Input, types::ID OutputType)
      58                6:   : JobAction(PrecompileJobClass, Input, OutputType) {
      59                6: }
      60                 : 
      61                2: AnalyzeJobAction::AnalyzeJobAction(Action *Input, types::ID OutputType)
      62                2:   : JobAction(AnalyzeJobClass, Input, OutputType) {
      63                2: }
      64                 : 
      65              165: CompileJobAction::CompileJobAction(Action *Input, types::ID OutputType)
      66              165:   : JobAction(CompileJobClass, Input, OutputType) {
      67              165: }
      68                 : 
      69               36: AssembleJobAction::AssembleJobAction(Action *Input, types::ID OutputType)
      70               36:   : JobAction(AssembleJobClass, Input, OutputType) {
      71               36: }
      72                 : 
      73               31: LinkJobAction::LinkJobAction(ActionList &Inputs, types::ID Type)
      74               31:   : JobAction(LinkJobClass, Inputs, Type) {
      75               31: }
      76                 : 
      77                4: LipoJobAction::LipoJobAction(ActionList &Inputs, types::ID Type)
      78                4:   : JobAction(LipoJobClass, Inputs, Type) {
      79                4: }

Generated: 2010-02-10 01:31 by zcov