blob: af2e3a21a0af77b2c6330d05eec39f90ce505548 [file] [log] [blame]
Qiu Chaofan19828e32019-04-23 05:50:24 +00001//===-- 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
14using namespace clang::driver::toolchains;
15using namespace llvm::opt;
16
17void PPCLinuxToolChain::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
18 ArgStringList &CC1Args) const {
Qiu Chaofan852d4442019-07-30 02:18:11 +000019 if (!DriverArgs.hasArg(clang::driver::options::OPT_nostdinc) &&
Qiu Chaofan19828e32019-04-23 05:50:24 +000020 !DriverArgs.hasArg(options::OPT_nobuiltininc)) {
21 const Driver &D = getDriver();
22 SmallString<128> P(D.ResourceDir);
23 llvm::sys::path::append(P, "include", "ppc_wrappers");
24 addSystemInclude(DriverArgs, CC1Args, P);
25 }
26
27 Linux::AddClangSystemIncludeArgs(DriverArgs, CC1Args);
28}