summaryrefslogtreecommitdiff
path: root/src/mem/slicc/ast/FormalParamAST.py
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2011-08-29 06:34:40 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2011-08-29 06:34:40 -0500
commitebda5c14a57d4c140e664b6f9c31dae9a94552aa (patch)
treec3690beba2669041b50b41692c701a81913fe786 /src/mem/slicc/ast/FormalParamAST.py
parent1bbca50491202c6527743fcca9030d55b4ddc06b (diff)
downloadgem5-ebda5c14a57d4c140e664b6f9c31dae9a94552aa.tar.xz
SLICC: Pass arguments by reference
Arguments to functions were being passed by value. This patch changes SLICC so that arguments are passed by reference.
Diffstat (limited to 'src/mem/slicc/ast/FormalParamAST.py')
-rw-r--r--src/mem/slicc/ast/FormalParamAST.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mem/slicc/ast/FormalParamAST.py b/src/mem/slicc/ast/FormalParamAST.py
index 783607f43..e94f24ccb 100644
--- a/src/mem/slicc/ast/FormalParamAST.py
+++ b/src/mem/slicc/ast/FormalParamAST.py
@@ -56,4 +56,4 @@ class FormalParamAST(AST):
return type, "%s* %s" % (type.c_ident, param)
else:
- return type, "%s %s" % (type.c_ident, param)
+ return type, "const %s& %s" % (type.c_ident, param)