Instantiator
Generate c++ template instantiations
Loading...
Searching...
No Matches
Instantiator.cpp File Reference
#include <filesystem>
#include <fstream>
#include <iostream>
#include <system_error>
#include <unordered_set>
#include "fmt/color.h"
#include "fmt/ranges.h"
#include "fmt/std.h"
#include "spdlog/cfg/env.h"
#include "spdlog/spdlog.h"
#include "clang/AST/ASTImporter.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Rewrite/Core/Rewriter.h"
#include "clang/Tooling/CommonOptionsParser.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/Support/CommandLine.h"
#include "ASTCreation.hpp"
#include "Callbacks/DeleteInstantiations.hpp"
#include "Callbacks/GetNeededInstantiations.hpp"
#include "Callbacks/InjectInstantiation.hpp"
#include "IO/ProgressBar.hpp"
#include "Injection.hpp"
#include "Matcher/Matcher.hpp"
Include dependency graph for Instantiator.cpp:

Go to the source code of this file.

Functions

static llvm::cl::OptionCategory InstantiatorOptions ("Instantiator options")
 
static llvm::cl::opt< bool > Invasive ("invasive", llvm::cl::desc("Inject instantiations invasively. (Directly after function definition.)"), llvm::cl::cat(InstantiatorOptions))
 
static llvm::cl::opt< bool > Progress ("progress", llvm::cl::desc("Print out a progress bar."), llvm::cl::cat(InstantiatorOptions))
 
static llvm::cl::opt< bool > Clean ("clean", llvm::cl::desc("Delete all explicit instantiations."), llvm::cl::cat(InstantiatorOptions))
 
static llvm::cl::list< std::string > excludePatterns ("exclude-namespace", llvm::cl::desc("List of namespaces which should be excluded. Several namespaces can be added by multiple --exclude-namespace calls."), llvm::cl::value_desc("namespace"), llvm::cl::cat(InstantiatorOptions))
 
static llvm::cl::alias excludePatternA ("e", llvm::cl::desc("Alias for --exclude-namespace"), llvm::cl::aliasopt(excludePatterns))
 
static llvm::cl::list< std::string > includePatterns ("include-namespace", llvm::cl::desc("List of namespaces which should be included. Several namespaces can be added by multiple --include-namespace calls."), llvm::cl::value_desc("namespace"), llvm::cl::cat(InstantiatorOptions))
 
static llvm::cl::alias includePatternA ("i", llvm::cl::desc("Alias for --include-namespace"), llvm::cl::aliasopt(includePatterns))
 
static llvm::cl::extrahelp CommonHelp (clang::tooling::CommonOptionsParser::HelpMessage)
 
int main (int argc, const char **argv)
 

Function Documentation

◆ Clean()

static llvm::cl::opt< bool > Clean ( "clean" ,
llvm::cl::desc("Delete all explicit instantiations.") ,
llvm::cl::cat(InstantiatorOptions)  )
static

◆ CommonHelp()

static llvm::cl::extrahelp CommonHelp ( clang::tooling::CommonOptionsParser::HelpMessage )
static

◆ excludePatternA()

static llvm::cl::alias excludePatternA ( "e" ,
llvm::cl::desc("Alias for --exclude-namespace") ,
llvm::cl::aliasopt(excludePatterns)  )
static

◆ excludePatterns()

static llvm::cl::list< std::string > excludePatterns ( "exclude-namespace" ,
llvm::cl::desc("List of namespaces which should be excluded. Several namespaces can be added by multiple --exclude-namespace calls.") ,
llvm::cl::value_desc("namespace") ,
llvm::cl::cat(InstantiatorOptions)  )
static

◆ includePatternA()

static llvm::cl::alias includePatternA ( "i" ,
llvm::cl::desc("Alias for --include-namespace") ,
llvm::cl::aliasopt(includePatterns)  )
static

◆ includePatterns()

static llvm::cl::list< std::string > includePatterns ( "include-namespace" ,
llvm::cl::desc("List of namespaces which should be included. Several namespaces can be added by multiple --include-namespace calls.") ,
llvm::cl::value_desc("namespace") ,
llvm::cl::cat(InstantiatorOptions)  )
static

◆ InstantiatorOptions()

static llvm::cl::OptionCategory InstantiatorOptions ( "Instantiator options" )
static

◆ Invasive()

static llvm::cl::opt< bool > Invasive ( "invasive" ,
llvm::cl::desc("Inject instantiations invasively. (Directly after function definition.)") ,
llvm::cl::cat(InstantiatorOptions)  )
static

◆ main()

int main ( int argc,
const char ** argv )

Definition at line 57 of file Instantiator.cpp.

◆ Progress()

static llvm::cl::opt< bool > Progress ( "progress" ,
llvm::cl::desc("Print out a progress bar.") ,
llvm::cl::cat(InstantiatorOptions)  )
static