Coverage Report

Created: 2020-09-19 12:23

/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/lib/Driver/ToolChains/ZOS.cpp
Line
Count
Source
1
//===--- ZOS.cpp - z/OS 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 "ZOS.h"
10
#include "CommonArgs.h"
11
#include "clang/Driver/Compilation.h"
12
#include "clang/Driver/Options.h"
13
#include "llvm/Option/ArgList.h"
14
15
using namespace clang::driver;
16
using namespace clang::driver::toolchains;
17
using namespace llvm::opt;
18
using namespace clang;
19
20
ZOS::ZOS(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
21
3
    : ToolChain(D, Triple, Args) {}
22
23
3
ZOS::~ZOS() {}
24
25
void ZOS::addClangTargetOptions(const ArgList &DriverArgs,
26
                                ArgStringList &CC1Args,
27
3
                                Action::OffloadKind DeviceOffloadKind) const {
28
  // Pass "-faligned-alloc-unavailable" only when the user hasn't manually
29
  // enabled or disabled aligned allocations.
30
3
  if (!DriverArgs.hasArgNoClaim(options::OPT_faligned_allocation,
31
3
                                options::OPT_fno_aligned_allocation))
32
1
    CC1Args.push_back("-faligned-alloc-unavailable");
33
3
}