Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/clang/lib/Driver/ToolChains/PPCLinux.cpp
Line
Count
Source
1
//===-- PPCLinux.cpp - PowerPC ToolChain Implementations --------*- C++ -*-===//
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 "PPCLinux.h"
10
#include "clang/Driver/Driver.h"
11
#include "clang/Driver/Options.h"
12
#include "llvm/Support/Path.h"
13
14
using namespace clang::driver::toolchains;
15
using namespace llvm::opt;
16
17
void PPCLinuxToolChain::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
18
324
                                                  ArgStringList &CC1Args) const {
19
324
  // PPC wrapper headers are implementation of x86 intrinsics on PowerPC, which
20
324
  // is not supported on PPC32 platform.
21
324
  if (getArch() != llvm::Triple::ppc &&
22
324
      
!DriverArgs.hasArg(clang::driver::options::OPT_nostdinc)298
&&
23
324
      
!DriverArgs.hasArg(options::OPT_nobuiltininc)298
) {
24
298
    const Driver &D = getDriver();
25
298
    SmallString<128> P(D.ResourceDir);
26
298
    llvm::sys::path::append(P, "include", "ppc_wrappers");
27
298
    addSystemInclude(DriverArgs, CC1Args, P);
28
298
  }
29
324
30
324
  Linux::AddClangSystemIncludeArgs(DriverArgs, CC1Args);
31
324
}