aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <azakai@mozilla.com>2010-11-16 23:04:47 -0800
committerAlon Zakai <azakai@mozilla.com>2010-11-16 23:04:47 -0800
commit6ce73a0bd1f8a1c6b2edf4b2f3d5eca64bcf3544 (patch)
tree0af531fd964b15e0bbab1646f33680fca1784bfb
parent776fde26f5f6fc68082513c22d392038379773a8 (diff)
differentiate llvm variables from functions in niceIdents
-rw-r--r--src/parseTools.js4
-rw-r--r--tools/namespacer.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/parseTools.js b/src/parseTools.js
index 1901b3fc..d2e3655f 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -56,7 +56,7 @@ function toNiceIdent(ident) {
assert(ident);
if (parseFloat(ident) == ident) return ident;
if (ident == 'null') return '0'; // see parseNumerical
- return ident.replace(/["\\ \.@%:<>,\*\[\]-]/g, '_');
+ return ident.replace('%', '$').replace(/["\\ \.@:<>,\*\[\]-]/g, '_');
}
function isStructPointerType(type) {
@@ -255,7 +255,7 @@ function parseParamTokens(params) {
intertype: 'value',
type: segment[0].text,
value: null,
- ident: '_' + absIndex,
+ ident: toNiceIdent('%') + absIndex,
});
}
} else if (segment[1].text in PARSABLE_LLVM_FUNCTIONS) {
diff --git a/tools/namespacer.py b/tools/namespacer.py
index 8e4c5e8e..c056533a 100644
--- a/tools/namespacer.py
+++ b/tools/namespacer.py
@@ -66,7 +66,7 @@ for line in data:
currspace[finalname] = realname
currspace[finalname + '__params'] = params
if len(funcparts) >= 2 and funcparts[-1] == funcparts[-2]:
- size = '_struct_%s' % '__'.join(funcparts[:-1])
+ size = '$struct_%s' % '__'.join(funcparts[:-1])
if len(funcparts) > 2:
size = '_' + size + '_'
size = size + '___SIZE'