LLVM API Documentation
#include <ProgramInfo.h>
Public Member Functions | |
| ProgramInfo (Module *m) | |
| ~ProgramInfo () | |
| sys::TimeValue | getProgramTimeStamp () const |
| const SourceFileInfo & | getSourceFile (const GlobalVariable *Desc) |
| const SourceFileInfo & | getSourceFile (const std::string &Filename) |
| const std::map< const GlobalVariable *, SourceFileInfo * > & | getSourceFiles (bool RequiresCompleteMap=true) |
| const SourceFunctionInfo & | getFunction (const GlobalVariable *Desc) |
| const std::map< const GlobalVariable *, SourceFunctionInfo * > & | getSourceFunctions (bool RequiresCompleteMap=true) |
| bool | allSourceFunctionsRead () const |
| template<typename SL> | |
| SL::CacheType & | getLanguageCache (const SL *L) |
Definition at line 132 of file ProgramInfo.h.
| ProgramInfo::ProgramInfo | ( | Module * | m | ) |
| ProgramInfo::~ProgramInfo | ( | ) |
| sys::TimeValue llvm::ProgramInfo::getProgramTimeStamp | ( | ) | const [inline] |
getProgramTimeStamp - Return the time-stamp of the program when it was loaded.
Definition at line 174 of file ProgramInfo.h.
| const SourceFileInfo & ProgramInfo::getSourceFile | ( | const GlobalVariable * | Desc | ) |
getSourceFile - Return source file information for the specified source file descriptor object, adding it to the collection as needed. This method always succeeds (is unambiguous), and is always efficient.
getSourceFile - Return source file information for the specified source file descriptor object, adding it to the collection as needed. This method always succeeds (is unambiguous), and is always efficient.
Definition at line 235 of file ProgramInfo.cpp.
References llvm::SourceLanguage::createSourceFileInfo(), llvm::SourceLanguage::get(), llvm::SourceFileInfo::getBaseName(), llvm::GlobalVariable::getInitializer(), and llvm::GlobalVariable::hasInitializer().
Referenced by getFunction(), getSourceFiles(), llvm::StackFrame::getSourceLocation(), and llvm::SourceFunctionInfo::SourceFunctionInfo().
| const SourceFileInfo & ProgramInfo::getSourceFile | ( | const std::string & | Filename | ) |
getSourceFile - Look up the file with the specified name. If there is more than one match for the specified filename, prompt the user to pick one. If there is no source file that matches the specified name, throw an exception indicating that we can't find the file. Otherwise, return the file information for that file.
If the source file hasn't been discovered yet in the program, this method might have to index the whole program by calling the getSourceFiles() method.
getSourceFile - Look up the file with the specified name. If there is more than one match for the specified filename, prompt the user to pick one. If there is no source file that matches the specified name, throw an exception indicating that we can't find the file. Otherwise, return the file information for that file.
Definition at line 302 of file ProgramInfo.cpp.
References End, getSourceFiles(), Start, and llvm::tie().
| const std::map< const GlobalVariable *, SourceFileInfo * > & ProgramInfo::getSourceFiles | ( | bool | RequiresCompleteMap = true |
) |
getSourceFiles - Index all of the source files in the program and return them. This information is lazily computed the first time that it is requested. Since this information can take a long time to compute, the user is given a chance to cancel it. If this occurs, an exception is thrown.
getSourceFiles - Index all of the source files in the program and return a mapping of it. This information is lazily computed the first time that it is requested. Since this information can take a long time to compute, the user is given a chance to cancel it. If this occurs, an exception is thrown.
Definition at line 264 of file ProgramInfo.cpp.
References llvm::StructType::get(), llvm::Module::getGlobalVariable(), getGlobalVariablesUsing(), getSourceFile(), and llvm::SlowOperationInformer::progress().
Referenced by getSourceFile().
| const SourceFunctionInfo & ProgramInfo::getFunction | ( | const GlobalVariable * | Desc | ) |
getFunction - Return source function information for the specified function descriptor object, adding it to the collection as needed. This method always succeeds (is unambiguous), and is always efficient.
getFunction - Return function information for the specified function descriptor object, adding it to the collection as needed. This method always succeeds (is unambiguous), and is always efficient.
Definition at line 326 of file ProgramInfo.cpp.
References llvm::SourceLanguage::createSourceFunctionInfo(), llvm::GlobalVariable::getInitializer(), llvm::SourceFileInfo::getLanguage(), getSourceFile(), GV, and llvm::GlobalVariable::hasInitializer().
Referenced by getSourceFunctions().
| const std::map< const GlobalVariable *, SourceFunctionInfo * > & ProgramInfo::getSourceFunctions | ( | bool | RequiresCompleteMap = true |
) |
getSourceFunctions - Index all of the functions in the program and return them. This information is lazily computed the first time that it is requested. Since this information can take a long time to compute, the user is given a chance to cancel it. If this occurs, an exception is thrown.
Definition at line 349 of file ProgramInfo.cpp.
References Functions, llvm::StructType::get(), getFunction(), llvm::Module::getGlobalVariable(), getGlobalVariablesUsing(), and llvm::SlowOperationInformer::progress().
| bool llvm::ProgramInfo::allSourceFunctionsRead | ( | ) | const [inline] |
addSourceFunctionsRead - Return true if the source functions map is complete: that is, all functions in the program have been read in.
Definition at line 226 of file ProgramInfo.h.
| SL::CacheType& llvm::ProgramInfo::getLanguageCache | ( | const SL * | L | ) | [inline] |
getLanguageCache - This method is used to build per-program caches of information, such as the functions or types visible to the program. This can be used by SourceLanguage implementations because it requires an accessible [sl]CacheType typedef, where [sl] is the C++ type of the source-language subclass.
Definition at line 234 of file ProgramInfo.h.