Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 1d467b2

Browse files
author
Dylan McKay
committed
[emscripten] Increment GEP type iterator alongside operand iterator
1 parent c58ae26 commit 1d467b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Target/JSBackend/JSBackend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2656,7 +2656,7 @@ void JSWriter::generateExpression(const User *I, raw_string_ostream& Code) {
26562656
GetElementPtrInst::const_op_iterator I = GEP->op_begin();
26572657
I++;
26582658
for (GetElementPtrInst::const_op_iterator E = GEP->op_end();
2659-
I != E; ++I) {
2659+
I != E; ++I, ++GTI) {
26602660
const Value *Index = *I;
26612661
if (StructType *STy = GTI.getStructTypeOrNull()) {
26622662
// For a struct, add the member offset.

0 commit comments

Comments
 (0)