diff --git a/es2panda/util/helpers.cpp b/es2panda/util/helpers.cpp index afe9ed62ab56e5f0e89bbf9d0b267d08267498ff..96475c41abdf46b606f6d629e0f6e14705417da1 100644 --- a/es2panda/util/helpers.cpp +++ b/es2panda/util/helpers.cpp @@ -426,12 +426,14 @@ bool Helpers::OptimizeProgram(panda::pandasm::Program * prog, es2panda::Compiler panda::Logger::Component::COMPILER; panda::Logger::InitializeStdLogging(panda::Logger::Level::ERROR, COMPONENT_MASK); - if (!panda::pandasm::AsmEmitter::Emit(options->output, *prog, statp, mapsp, true)) { + if (!panda::pandasm::AsmEmitter::Emit(panda::os::file::File::GetExtendedFilePath(options->output), *prog, statp, + mapsp, true)) { return false; } panda::bytecodeopt::options.SetOptLevel(options->optLevel); - panda::bytecodeopt::OptimizeBytecode(prog, mapsp, options->output, true, true); + panda::bytecodeopt::OptimizeBytecode(prog, mapsp, panda::os::file::File::GetExtendedFilePath(options->output), true, + true); #endif return true; } diff --git a/merge_abc/src/main.cpp b/merge_abc/src/main.cpp index 00c860a4e79e57f2a6cc3dbe154e6a15296cc380..6df5188f8fe5387071f1a5af4d8ba7dc7bd40cfb 100644 --- a/merge_abc/src/main.cpp +++ b/merge_abc/src/main.cpp @@ -80,7 +80,8 @@ int Run(int argc, const char **argv) std::string outputFileName = outputFilePath.append(panda::os::file::File::GetPathDelim()). append(options->outputFileName()); - if (!panda::pandasm::AsmEmitter::EmitPrograms(outputFileName, programs, true)) { + if (!panda::pandasm::AsmEmitter::EmitPrograms(panda::os::file::File::GetExtendedFilePath(outputFileName), programs, + true)) { return 1; }