Introduce the --no-link option

Introduce an option to prevent `revamb` from linking in all the QEMU
helpers. This is useful if the output doesn't need to be compiled, but
just analyzed.
This commit is contained in:
Alessandro Di Federico
2017-01-11 15:25:53 +01:00
parent 3f760876f7
commit 4501dad2c0
4 changed files with 27 additions and 11 deletions
+6 -1
View File
@@ -296,7 +296,12 @@ bool CorrectCPUStateUsagePass::runOnModule(Module& TheModule) {
continue;
}
assert(!Callee->empty() && "external functions are not supported");
assert((Callee->getName().startswith("helper")
|| !Callee->empty())
&& "external functions are not supported");
if (Callee->empty())
break;
// TODO: move all the specialization-handling code outside
// Is the callee already a specialization?