clang 20.0.0git
Classes | Namespaces | Macros | Functions
CodeGenAction.cpp File Reference
#include "clang/CodeGen/CodeGenAction.h"
#include "BackendConsumer.h"
#include "CGCall.h"
#include "CodeGenModule.h"
#include "CoverageMappingGen.h"
#include "MacroPPCallbacks.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclGroup.h"
#include "clang/Basic/DiagnosticFrontend.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/LangStandard.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/CodeGen/BackendUtil.h"
#include "clang/CodeGen/ModuleBuilder.h"
#include "clang/Driver/DriverDiagnostic.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Frontend/FrontendActions.h"
#include "clang/Frontend/FrontendDiagnostic.h"
#include "clang/Frontend/MultiplexConsumer.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Serialization/ASTWriter.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/Bitcode/BitcodeReader.h"
#include "llvm/CodeGen/MachineOptimizationRemarkEmitter.h"
#include "llvm/Demangle/Demangle.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/DiagnosticPrinter.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/LLVMRemarkStreamer.h"
#include "llvm/IR/Module.h"
#include "llvm/IRReader/IRReader.h"
#include "llvm/LTO/LTOBackend.h"
#include "llvm/Linker/Linker.h"
#include "llvm/Pass.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/TimeProfiler.h"
#include "llvm/Support/Timer.h"
#include "llvm/Support/ToolOutputFile.h"
#include "llvm/Support/YAMLTraits.h"
#include "llvm/Transforms/IPO/Internalize.h"
#include "llvm/Transforms/Utils/Cloning.h"
#include <optional>

Go to the source code of this file.

Classes

class  clang::ClangDiagnosticHandler
 

Namespaces

namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
 

Macros

#define DEBUG_TYPE   "codegenaction"
 
#define ComputeDiagID(Severity, GroupName, DiagID)
 
#define ComputeDiagRemarkID(Severity, GroupName, DiagID)
 

Functions

static void clang::reportOptRecordError (Error E, DiagnosticsEngine &Diags, const CodeGenOptions &CodeGenOpts)
 
static FullSourceLoc ConvertBackendLocation (const llvm::SMDiagnostic &D, SourceManager &CSM)
 ConvertBackendLocation - Convert a location in a temporary llvm::SourceMgr buffer to be a valid FullSourceLoc.
 
static std::unique_ptr< raw_pwrite_stream > GetOutputStream (CompilerInstance &CI, StringRef InFile, BackendAction Action)
 

Macro Definition Documentation

◆ ComputeDiagID

#define ComputeDiagID (   Severity,
  GroupName,
  DiagID 
)
Value:
do { \
switch (Severity) { \
case llvm::DS_Error: \
DiagID = diag::err_fe_##GroupName; \
break; \
case llvm::DS_Warning: \
DiagID = diag::warn_fe_##GroupName; \
break; \
case llvm::DS_Remark: \
llvm_unreachable("'remark' severity not expected"); \
break; \
case llvm::DS_Note: \
DiagID = diag::note_fe_##GroupName; \
break; \
} \
} while (false)

Definition at line 429 of file CodeGenAction.cpp.

◆ ComputeDiagRemarkID

#define ComputeDiagRemarkID (   Severity,
  GroupName,
  DiagID 
)
Value:
do { \
switch (Severity) { \
case llvm::DS_Error: \
DiagID = diag::err_fe_##GroupName; \
break; \
case llvm::DS_Warning: \
DiagID = diag::warn_fe_##GroupName; \
break; \
case llvm::DS_Remark: \
DiagID = diag::remark_fe_##GroupName; \
break; \
case llvm::DS_Note: \
DiagID = diag::note_fe_##GroupName; \
break; \
} \
} while (false)

Definition at line 447 of file CodeGenAction.cpp.

◆ DEBUG_TYPE

#define DEBUG_TYPE   "codegenaction"

Definition at line 61 of file CodeGenAction.cpp.

Function Documentation

◆ ConvertBackendLocation()

static FullSourceLoc ConvertBackendLocation ( const llvm::SMDiagnostic &  D,
SourceManager CSM 
)
static

ConvertBackendLocation - Convert a location in a temporary llvm::SourceMgr buffer to be a valid FullSourceLoc.

Definition at line 402 of file CodeGenAction.cpp.

References clang::SourceManager::createFileID(), D, clang::SourceManager::getLocForStartOfFile(), and clang::SourceLocation::getLocWithOffset().

Referenced by clang::BackendConsumer::SrcMgrDiagHandler().

◆ GetOutputStream()

static std::unique_ptr< raw_pwrite_stream > GetOutputStream ( CompilerInstance CI,
StringRef  InFile,
BackendAction  Action 
)
static