summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineRegisterInfo.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-10-24 23:11:13 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-10-24 23:11:13 +0000
commit84921b9860adbc7cd40df8beb9caf542ddaaa51b (patch)
tree5baaa37b6d913d64895cd573ea2e5e36372f5c51 /llvm/lib/CodeGen/MachineRegisterInfo.cpp
parentf82ed2a28cefc1933052daa7cf81ca80bc405ed2 (diff)
downloadbcm5719-llvm-84921b9860adbc7cd40df8beb9caf542ddaaa51b.tar.gz
bcm5719-llvm-84921b9860adbc7cd40df8beb9caf542ddaaa51b.zip
Refactor: Simplify boolean conditional return statements in lib/CodeGen.
Patch by Richard. llvm-svn: 251213
Diffstat (limited to 'llvm/lib/CodeGen/MachineRegisterInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineRegisterInfo.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/MachineRegisterInfo.cpp b/llvm/lib/CodeGen/MachineRegisterInfo.cpp
index ffc1f200e21..abf9b4d6769 100644
--- a/llvm/lib/CodeGen/MachineRegisterInfo.cpp
+++ b/llvm/lib/CodeGen/MachineRegisterInfo.cpp
@@ -468,11 +468,8 @@ static bool isNoReturnDef(const MachineOperand &MO) {
if (MF.getFunction()->hasFnAttribute(Attribute::UWTable))
return false;
const Function *Called = getCalledFunction(MI);
- if (Called == nullptr || !Called->hasFnAttribute(Attribute::NoReturn)
- || !Called->hasFnAttribute(Attribute::NoUnwind))
- return false;
-
- return true;
+ return !(Called == nullptr || !Called->hasFnAttribute(Attribute::NoReturn) ||
+ !Called->hasFnAttribute(Attribute::NoUnwind));
}
bool MachineRegisterInfo::isPhysRegModified(unsigned PhysReg) const {
OpenPOWER on IntegriCloud