mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 11:39:35 +00:00
Check multiple return values.
llvm-svn: 48267
This commit is contained in:
parent
dc5b6b2e5d
commit
cc189b5606
@ -420,7 +420,8 @@ struct VISIBILITY_HIDDEN ExitInMainOptimization : public LibCallOptimization {
|
||||
// to exit have the same type.
|
||||
Function *from = ci->getParent()->getParent();
|
||||
if (from->hasExternalLinkage())
|
||||
if (from->getReturnType() == ci->getOperand(1)->getType())
|
||||
if (from->getReturnType() == ci->getOperand(1)->getType()
|
||||
&& !isa<StructType>(from->getReturnType()))
|
||||
if (from->getName() == "main") {
|
||||
// Okay, time to actually do the optimization. First, get the basic
|
||||
// block of the call instruction
|
||||
|
Loading…
Reference in New Issue
Block a user