Linux Perf
clang.cpp File Reference
#include "clang/Basic/Version.h"
#include "clang/CodeGen/CodeGenAction.h"
#include "clang/Frontend/CompilerInvocation.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Frontend/TextDiagnosticPrinter.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/Module.h"
#include "llvm/Option/Option.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
#include <memory>
#include "clang.h"
#include "clang-c.h"
Include dependency graph for clang.cpp:

Go to the source code of this file.

Namespaces

 perf
 

Functions

static CompilerInvocation * perf::createCompilerInvocation (llvm::opt::ArgStringList CFlags, StringRef &Path, DiagnosticsEngine &Diags)
 
static std::unique_ptr< llvm::Module > perf::getModuleFromSource (llvm::opt::ArgStringList CFlags, StringRef Path, IntrusiveRefCntPtr< vfs::FileSystem > VFS)
 
std::unique_ptr< llvm::Module > perf::getModuleFromSource (llvm::opt::ArgStringList CFlags, StringRef Name, StringRef Content)
 
std::unique_ptr< llvm::Module > perf::getModuleFromSource (llvm::opt::ArgStringList CFlags, StringRef Path)
 
std::unique_ptr< llvm::SmallVectorImpl< char > > perf::getBPFObjectFromModule (llvm::Module *Module)
 
void perf_clang__init (void)
 
void perf_clang__cleanup (void)
 
int perf_clang__compile_bpf (const char *filename, void **p_obj_buf, size_t *p_obj_buf_sz)
 

Variables

static std::unique_ptr< llvm::LLVMContext > perf::LLVMCtx
 

Function Documentation

◆ perf_clang__cleanup()

void perf_clang__cleanup ( void  )

Definition at line 171 of file clang.cpp.

◆ perf_clang__compile_bpf()

int perf_clang__compile_bpf ( const char *  filename,
void **  p_obj_buf,
size_t *  p_obj_buf_sz 
)

Definition at line 177 of file clang.cpp.

Here is the call graph for this function:

◆ perf_clang__init()

void perf_clang__init ( void  )

Definition at line 162 of file clang.cpp.