clang API Documentation
#include "CoverageMappingGen.h"#include "clang/CodeGen/CodeGenAction.h"#include "clang/AST/ASTConsumer.h"#include "clang/AST/ASTContext.h"#include "clang/AST/DeclGroup.h"#include "clang/AST/DeclCXX.h"#include "clang/Basic/FileManager.h"#include "clang/Basic/SourceManager.h"#include "clang/Basic/TargetInfo.h"#include "clang/Lex/Preprocessor.h"#include "clang/CodeGen/BackendUtil.h"#include "clang/CodeGen/ModuleBuilder.h"#include "clang/Frontend/CompilerInstance.h"#include "clang/Frontend/FrontendDiagnostic.h"#include "llvm/ADT/SmallString.h"#include "llvm/Bitcode/ReaderWriter.h"#include "llvm/IR/DebugInfo.h"#include "llvm/IR/DiagnosticInfo.h"#include "llvm/IR/DiagnosticPrinter.h"#include "llvm/IR/LLVMContext.h"#include "llvm/IR/Module.h"#include "llvm/IRReader/IRReader.h"#include "llvm/Linker/Linker.h"#include "llvm/Pass.h"#include "llvm/Support/MemoryBuffer.h"#include "llvm/Support/SourceMgr.h"#include "llvm/Support/Timer.h"#include <memory>
Go to the source code of this file.
Classes | |
| class | clang::BackendConsumer |
Namespaces | |
| namespace | clang |
Defines | |
| #define | ComputeDiagID(Severity, GroupName, DiagID) |
| #define | ComputeDiagRemarkID(Severity, GroupName, DiagID) |
Functions | |
| static FullSourceLoc | ConvertBackendLocation (const llvm::SMDiagnostic &D, SourceManager &CSM) |
| static raw_ostream * | GetOutputStream (CompilerInstance &CI, StringRef InFile, BackendAction Action) |
| #define ComputeDiagID | ( | Severity, | |
| GroupName, | |||
| DiagID | |||
| ) |
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 345 of file CodeGenAction.cpp.
Referenced by clang::BackendConsumer::DiagnosticHandlerImpl(), and clang::BackendConsumer::InlineAsmDiagHandler().
| #define ComputeDiagRemarkID | ( | Severity, | |
| GroupName, | |||
| DiagID | |||
| ) |
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 363 of file CodeGenAction.cpp.
Referenced by clang::BackendConsumer::DiagnosticHandlerImpl().
| 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 261 of file CodeGenAction.cpp.
References clang::SourceManager::createFileID(), clang::SourceManager::getLocForStartOfFile(), clang::SourceLocation::getLocWithOffset(), and SourceMgr.
Referenced by clang::BackendConsumer::InlineAsmDiagHandler2().
| static raw_ostream* GetOutputStream | ( | CompilerInstance & | CI, |
| StringRef | InFile, | ||
| BackendAction | Action | ||
| ) | [static] |
Definition at line 605 of file CodeGenAction.cpp.
References clang::Backend_EmitAssembly, clang::Backend_EmitBC, clang::Backend_EmitLL, clang::Backend_EmitMCNull, clang::Backend_EmitNothing, clang::Backend_EmitObj, clang::CompilerInstance::createDefaultOutputFile(), and clang::CompilerInstance::createNullOutputFile().
Referenced by clang::CodeGenAction::CreateASTConsumer(), and clang::CodeGenAction::ExecuteAction().