74 llvm::Function *
function;
140 bool AddVariable(
Symbol *symbol);
157 bool AddFunction(
Symbol *symbol);
165 bool LookupFunction(
const char *name, std::vector<Symbol *> *matches = NULL);
185 template <
typename Predicate>
void GetMatchingFunctions(Predicate pred, std::vector<Symbol *> *matches)
const;
191 template <
typename Predicate>
void GetMatchingVariables(Predicate pred, std::vector<Symbol *> *matches)
const;
213 const Type *LookupType(
const char *name)
const;
219 bool ContainsType(
const Type *type)
const;
229 std::vector<std::string> ClosestVariableOrFunctionMatch(
const char *name)
const;
233 std::vector<std::string> ClosestTypeMatch(
const char *name)
const;
235 std::vector<std::string> ClosestEnumTypeMatch(
const char *name)
const;
246 const Type *RandomType();
249 std::vector<std::string> closestTypeMatch(
const char *str,
bool structsVsEnums)
const;
276 template <
typename Predicate>
280 FunctionMapType::const_iterator iter;
281 for (iter = functions.begin(); iter != functions.end(); ++iter) {
282 const std::vector<Symbol *> &syms = iter->second;
283 for (
unsigned int j = 0; j < syms.size(); ++j) {
285 matches->push_back(syms[j]);
290 template <
typename Predicate>
292 for (
unsigned int i = 0; i < variables.size(); ++i) {
294 SymbolMapType::const_iterator iter;
295 for (iter = sm.begin(); iter != sm.end(); ++iter) {
296 if (pred(iter->second))
297 matches->push_back(iter->second);
std::map< std::string, const Type * > TypeMapType
Expression representing a compile-time constant value.
Symbol table that holds all known symbols during parsing and compilation.
FunctionMapType functions
std::vector< SymbolMapType * > freeSymbolMaps
Symbol(const std::string &name, SourcePos pos, const Type *t=NULL, StorageClass sc=SC_NONE)
void GetMatchingVariables(Predicate pred, std::vector< Symbol *> *matches) const
std::map< std::string, std::vector< Symbol * > > FunctionMapType
std::vector< SymbolMapType * > variables
Representation of a structure holding a number of members.
StorageClass storageClass
Representation of a range of positions in a source file.
Declarations related to type declarations; the parser basically creates instances of these classes...
std::map< std::string, Symbol * > SymbolMapType
Type representing a function (return type + argument types)
Representation of a program symbol.
Interface class that defines the type abstraction.
void GetMatchingFunctions(Predicate pred, std::vector< Symbol *> *matches) const
const Function * parentFunction
Main ispc.header file. Defines Target, Globals and Opt classes.
llvm::Function * exportedFunction