OmniSciDB  5ade3759e0
anonymous_namespace{UDFCompiler.cpp}::FunctionDeclVisitor Class Reference
+ Inheritance diagram for anonymous_namespace{UDFCompiler.cpp}::FunctionDeclVisitor:
+ Collaboration diagram for anonymous_namespace{UDFCompiler.cpp}::FunctionDeclVisitor:

Public Member Functions

 FunctionDeclVisitor (llvm::raw_fd_ostream &ast_file, SourceManager &s_manager)
 
bool VisitFunctionDecl (FunctionDecl *f)
 

Private Member Functions

std::string getMainFileName () const
 
std::string getFuncDeclFileName (FunctionDecl *f) const
 

Private Attributes

llvm::raw_fd_ostream & ast_file_
 
SourceManager & source_manager_
 

Detailed Description

Definition at line 46 of file UDFCompiler.cpp.

Constructor & Destructor Documentation

◆ FunctionDeclVisitor()

anonymous_namespace{UDFCompiler.cpp}::FunctionDeclVisitor::FunctionDeclVisitor ( llvm::raw_fd_ostream &  ast_file,
SourceManager &  s_manager 
)
inline

Definition at line 48 of file UDFCompiler.cpp.

49  : ast_file_(ast_file), source_manager_(s_manager) {
50  source_manager_.getDiagnostics().setShowColors();
51  }

Member Function Documentation

◆ getFuncDeclFileName()

std::string anonymous_namespace{UDFCompiler.cpp}::FunctionDeclVisitor::getFuncDeclFileName ( FunctionDecl *  f) const
inlineprivate

Definition at line 70 of file UDFCompiler.cpp.

70  {
71  SourceLocation spell_loc = source_manager_.getSpellingLoc(f->getLocation());
72  PresumedLoc p_loc = source_manager_.getPresumedLoc(spell_loc);
73 
74  return std::string(p_loc.getFilename());
75  }

◆ getMainFileName()

std::string anonymous_namespace{UDFCompiler.cpp}::FunctionDeclVisitor::getMainFileName ( ) const
inlineprivate

Definition at line 65 of file UDFCompiler.cpp.

65  {
66  auto f_entry = source_manager_.getFileEntryForID(source_manager_.getMainFileID());
67  return f_entry->getName().str();
68  }

◆ VisitFunctionDecl()

bool anonymous_namespace{UDFCompiler.cpp}::FunctionDeclVisitor::VisitFunctionDecl ( FunctionDecl *  f)
inline

Definition at line 53 of file UDFCompiler.cpp.

53  {
54  // Only function definitions (with bodies), not declarations.
55  if (f->hasBody()) {
57  f->dump(ast_file_);
58  }
59  }
60 
61  return true;
62  }
std::string getFuncDeclFileName(FunctionDecl *f) const
Definition: UDFCompiler.cpp:70

Member Data Documentation

◆ ast_file_

llvm::raw_fd_ostream& anonymous_namespace{UDFCompiler.cpp}::FunctionDeclVisitor::ast_file_
private

Definition at line 78 of file UDFCompiler.cpp.

◆ source_manager_

SourceManager& anonymous_namespace{UDFCompiler.cpp}::FunctionDeclVisitor::source_manager_
private

Definition at line 79 of file UDFCompiler.cpp.


The documentation for this class was generated from the following file: