clang 20.0.0git
Macros | Functions
Cuda.cpp File Reference
#include "Cuda.h"
#include "CommonArgs.h"
#include "clang/Basic/Cuda.h"
#include "clang/Config/config.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/Distro.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/DriverDiagnostic.h"
#include "clang/Driver/InputInfo.h"
#include "clang/Driver/Options.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/FormatAdapters.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/VirtualFileSystem.h"
#include "llvm/TargetParser/Host.h"
#include "llvm/TargetParser/TargetParser.h"
#include <system_error>

Go to the source code of this file.

Macros

#define CASE_CUDA_VERSION(CUDA_VER, PTX_VER)
 

Functions

static DeviceDebugInfoLevel mustEmitDebugInfo (const ArgList &Args)
 Define debug info level for the NVPTX devices.
 
static bool shouldIncludePTX (const ArgList &Args, StringRef InputArch)
 

Macro Definition Documentation

◆ CASE_CUDA_VERSION

#define CASE_CUDA_VERSION (   CUDA_VER,
  PTX_VER 
)
Value:
case CudaVersion::CUDA_##CUDA_VER: \
PtxFeature = "+ptx" #PTX_VER; \
break;

Function Documentation

◆ mustEmitDebugInfo()

static DeviceDebugInfoLevel mustEmitDebugInfo ( const ArgList &  Args)
static

Define debug info level for the NVPTX devices.

If the debug info for both the host and device are disabled (-g0/-ggdb0 or no debug options at all). If only debug directives are requested for the both host and device (-gline-directvies-only), or the debug info only for the device is disabled (optimization is on and –cuda-noopt-device-debug was not specified), the debug directves only must be emitted for the device. Otherwise, use the same debug info level just like for the host (with the limitations of only supported DWARF2 standard).

Definition at line 359 of file Cuda.cpp.

References clang::driver::willEmitRemarks().

Referenced by clang::driver::toolchains::NVPTXToolChain::adjustDebugInfoKind(), clang::driver::tools::NVPTX::Assembler::ConstructJob(), clang::driver::tools::NVPTX::FatBinary::ConstructJob(), and clang::driver::tools::NVPTX::Linker::ConstructJob().

◆ shouldIncludePTX()

static bool shouldIncludePTX ( const ArgList &  Args,
StringRef  InputArch 
)
static

Definition at line 503 of file Cuda.cpp.

Referenced by clang::driver::tools::NVPTX::FatBinary::ConstructJob().