diff options
Diffstat (limited to 'src/tools/wasm2c-wrapper.h')
-rw-r--r-- | src/tools/wasm2c-wrapper.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/tools/wasm2c-wrapper.h b/src/tools/wasm2c-wrapper.h index ae32ec744..f44fc5ca0 100644 --- a/src/tools/wasm2c-wrapper.h +++ b/src/tools/wasm2c-wrapper.h @@ -30,9 +30,7 @@ namespace wasm { inline std::string wasm2cMangle(Name name, Signature sig) { const char escapePrefix = 'Z'; std::string mangled = "Z_"; - const char* original = name.str; - unsigned char c; - while ((c = *original++)) { + for (unsigned char c : name.str) { if ((isalnum(c) && c != escapePrefix) || c == '_') { // This character is ok to emit as it is. mangled += c; @@ -168,14 +166,14 @@ int main(int argc, char** argv) { auto* func = wasm.getFunction(exp->value); ret += std::string(" puts(\"[fuzz-exec] calling ") + - exp->name.str + "\");\n"; + exp->name.toString() + "\");\n"; auto result = func->getResults(); // Emit the call itself. ret += " "; if (result != Type::none) { - ret += std::string("printf(\"[fuzz-exec] note result: ") + exp->name.str + - " => "; + ret += std::string("printf(\"[fuzz-exec] note result: ") + + exp->name.toString() + " => "; TODO_SINGLE_COMPOUND(result); switch (result.getBasic()) { case Type::i32: |