diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-08-31 16:36:18 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-08-31 16:36:18 -0700 |
commit | 1e7f45eb40bf8597ae7b1263e9e546737979851c (patch) | |
tree | 7f645b51cb46b9b66323d8420e74b5b02cc71d32 /src/parseTools.js | |
parent | a05dd4524a3ecab9fd43da6cfc3707f0f84875ea (diff) |
llvm 3.0 anonymous structure support and metadata updates
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index a3347139..78b88ea8 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -114,6 +114,7 @@ function isStructPointerType(type) { function isStructType(type) { if (isPointerType(type)) return false; if (new RegExp(/^\[\d+\ x\ (.*)\]/g).test(type)) return true; // [15 x ?] blocks. Like structs + if (new RegExp(/{ [^}]* }/g).test(type)) return true; // { i32, i8 } etc. - anonymous struct types // See comment in isStructPointerType() return !Runtime.isNumberType(type) && type[0] == '%'; } @@ -148,7 +149,7 @@ function isFunctionType(type) { if (pointingLevels(type) !== 1) return false; var text = removeAllPointing(parts.slice(1).join(' ')); if (!text) return false; - return isType(parts[0]) && isFunctionDef({ text: text, item: tokenizer.processItem({ lineText: text.substr(1, text.length-2) }, true) }); + return isType(parts[0]) && isFunctionDef({ text: text, item: tokenize(text.substr(1, text.length-2), true) }); } function isType(type) { // TODO! |