summaryrefslogtreecommitdiff
path: root/include/llvm/MC/MCInstrDesc.h
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-04-13 04:57:38 +0000
committerCraig Topper <craig.topper@gmail.com>2014-04-13 04:57:38 +0000
commit4266ae806798f1e8982a53bb9babe1e508adfc68 (patch)
treed0a8021366191c2884dc07bfe73a2daee0b417c1 /include/llvm/MC/MCInstrDesc.h
parent4e510c10b5310cffe6c27fb49c7f7d170dc73639 (diff)
downloadllvm-4266ae806798f1e8982a53bb9babe1e508adfc68.tar.gz
llvm-4266ae806798f1e8982a53bb9babe1e508adfc68.tar.bz2
llvm-4266ae806798f1e8982a53bb9babe1e508adfc68.tar.xz
[C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206129 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCInstrDesc.h')
-rw-r--r--include/llvm/MC/MCInstrDesc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/MC/MCInstrDesc.h b/include/llvm/MC/MCInstrDesc.h
index 214b593f4a..5896de7f76 100644
--- a/include/llvm/MC/MCInstrDesc.h
+++ b/include/llvm/MC/MCInstrDesc.h
@@ -504,7 +504,7 @@ public:
/// \brief Return the number of implicit uses this instruction has.
unsigned getNumImplicitUses() const {
- if (ImplicitUses == 0) return 0;
+ if (!ImplicitUses) return 0;
unsigned i = 0;
for (; ImplicitUses[i]; ++i) /*empty*/;
return i;
@@ -526,7 +526,7 @@ public:
/// \brief Return the number of implicit defs this instruct has.
unsigned getNumImplicitDefs() const {
- if (ImplicitDefs == 0) return 0;
+ if (!ImplicitDefs) return 0;
unsigned i = 0;
for (; ImplicitDefs[i]; ++i) /*empty*/;
return i;
@@ -544,7 +544,7 @@ public:
/// \brief Return true if this instruction implicitly
/// defines the specified physical register.
bool hasImplicitDefOfPhysReg(unsigned Reg,
- const MCRegisterInfo *MRI = 0) const {
+ const MCRegisterInfo *MRI = nullptr) const {
if (const uint16_t *ImpDefs = ImplicitDefs)
for (; *ImpDefs; ++ImpDefs)
if (*ImpDefs == Reg || (MRI && MRI->isSubRegister(Reg, *ImpDefs)))