namespace GL {
namespace SL {
-const std::string &DumpTree::apply(Stage &stage)
+std::string DumpTree::apply(Stage &stage)
{
formatted = format("Stage: %s\n", Stage::get_stage_name(stage.type));
tree.push_back(BRANCH);
std::vector<TreeChars> tree;
public:
- const std::string &apply(Stage &);
+ std::string apply(Stage &);
private:
void append(const std::string &);
pass(REFERENCED)
{ }
-const string &InlineContentInjector::apply(Stage &stage, FunctionDeclaration &target_func, Block &tgt_blk, const NodeList<Statement>::iterator &ins_pt, FunctionCall &call)
+string InlineContentInjector::apply(Stage &stage, FunctionDeclaration &target_func, Block &tgt_blk, const NodeList<Statement>::iterator &ins_pt, FunctionCall &call)
{
source_func = call.declaration->definition;
public:
InlineableFunctionLocator();
- const std::set<FunctionDeclaration *> &apply(Stage &s) { s.content.visit(*this); return inlineable; }
+ std::set<FunctionDeclaration *> apply(Stage &s) { s.content.visit(*this); return inlineable; }
private:
virtual void visit(FunctionCall &);
public:
InlineContentInjector();
- const std::string &apply(Stage &, FunctionDeclaration &, Block &, const NodeList<Statement>::iterator &, FunctionCall &);
+ std::string apply(Stage &, FunctionDeclaration &, Block &, const NodeList<Statement>::iterator &, FunctionCall &);
private:
virtual void visit(VariableReference &);
r_empty_name(false)
{ }
-const string &Formatter::apply(Stage &s)
+string Formatter::apply(Stage &s)
{
stage = &s;
omit_builtin = true;
public:
Formatter();
- const std::string &apply(Stage &);
- const std::string &apply(Node &n) { n.visit(*this); return formatted; }
+ std::string apply(Stage &);
+ std::string apply(Node &n) { n.visit(*this); return formatted; }
private:
void append(const std::string &);