blob: 884828852ff017b80cc4a6d713fc8e8a08a6c321 [file] [log] [blame] [raw]
const Compile = require('../base-compiler'),
logger = require('../logger').logger;
function compileSwift(info, env) {
const compiler = new Compile(info, env);
compiler.handlePostProcessResult = function (result, postResult) {
result.asm = postResult.stdout;
// Seems swift-demangle like to exit with error 1
if (postResult.code !== 0 && !result.asm) {
result.asm = "<Error during post processing: " + postResult.code + ">";
logger.error("Error during post-processing", result);
}
return result;
};
return compiler.initialise();
}
module.exports = compileSwift;