Skip to content

Commit

Permalink
handle |byval align X|
Browse files Browse the repository at this point in the history
  • Loading branch information
kripken committed May 10, 2011
1 parent 9e272a8 commit 123385f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var LLVM = {
LINKAGES: set('private', 'linker_private', 'linker_private_weak', 'linker_private_weak_def_auto', 'internal',
'available_externally', 'linkonce', 'common', 'weak', 'appending', 'extern_weak', 'linkonce_odr',
'weak_odr', 'externally_visible', 'dllimport', 'dllexport', 'unnamed_addr'),
PARAM_ATTR: set('noalias', 'signext', 'zeroext', 'inreg', 'byval', 'sret', 'nocapture', 'nest'),
PARAM_ATTR: set('noalias', 'signext', 'zeroext', 'inreg', 'sret', 'nocapture', 'nest'),
CALLING_CONVENTIONS: set('ccc', 'fastcc', 'coldcc', 'cc10')
};
LLVM.GLOBAL_MODIFIERS = set(keys(LLVM.LINKAGES).concat(['constant', 'global', 'hidden']));
Expand Down
7 changes: 7 additions & 0 deletions src/parseTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,13 @@ function parseParamTokens(params) {
var segment = params.slice(0, i);
params = params.slice(i+1);
segment = cleanSegment(segment);
if (segment[1] && segment[1].text === 'byval') {
// handle 'byval' and 'byval align X'
segment.splice(1, 1);
if (segment[1] && segment[1].text === 'align') {
segment.splice(1, 2);
}
}
if (segment.length == 1) {
if (segment[0].text == '...') {
ret.push({
Expand Down

0 comments on commit 123385f

Please sign in to comment.