aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/intertyper.js8
-rw-r--r--src/parseTools.js2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/intertyper.js b/src/intertyper.js
index 98b117ff..958bd5af 100644
--- a/src/intertyper.js
+++ b/src/intertyper.js
@@ -549,11 +549,13 @@ function intertyper(data) {
item['param'+i] = parseLLVMSegment(segments[i-1]);
}
}
- if (item.op !== 'select') {
- item.type = item.param1.type;
- } else {
+ if (item.op === 'select') {
assert(item.param2.type === item.param3.type);
item.type = item.param2.type;
+ } else if (item.op === 'inttoptr' || item.op === 'ptrtoint') {
+ item.type = item.param2.type;
+ } else {
+ item.type = item.param1.type;
}
this.forwardItem(item, 'Reintegrator');
},
diff --git a/src/parseTools.js b/src/parseTools.js
index fed60d77..3e65a039 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -288,7 +288,7 @@ function parseLLVMSegment(segment) {
return {
intertype: 'value',
ident: segment[0].text,
- type: '?',
+ type: isType(segment[0].text) ? segment[0].text : '?',
};
} else if (segment[0].text in PARSABLE_LLVM_FUNCTIONS) {
return parseLLVMFunctionCall([{text: '?'}].concat(segment));