diff options
author | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2019-05-23 10:50:01 +0000 |
---|---|---|
committer | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2019-05-23 10:50:01 +0000 |
commit | 28afd8dc711261aeb082739740e86d28d1a50082 (patch) | |
tree | a76cd28aedbc8dec29c59d367366db5b050fffb7 /llvm/lib/MCA | |
parent | f95b05c3df6eccb66d934c6529091400195d57ff (diff) | |
download | bcm5719-llvm-28afd8dc711261aeb082739740e86d28d1a50082.tar.gz bcm5719-llvm-28afd8dc711261aeb082739740e86d28d1a50082.zip |
[MCA] Make the bool conversion operator in class InstRef explicit. NFCI
This patch makes the bool conversion operator in InstRef explicit.
It also adds a operator< to hel comparing InstRef objects in sets.
llvm-svn: 361482
Diffstat (limited to 'llvm/lib/MCA')
-rw-r--r-- | llvm/lib/MCA/Stages/EntryStage.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/MCA/Stages/EntryStage.cpp b/llvm/lib/MCA/Stages/EntryStage.cpp index 2028b9e2b76..d2f5613a0fb 100644 --- a/llvm/lib/MCA/Stages/EntryStage.cpp +++ b/llvm/lib/MCA/Stages/EntryStage.cpp @@ -18,7 +18,9 @@ namespace llvm { namespace mca { -bool EntryStage::hasWorkToComplete() const { return CurrentInstruction; } +bool EntryStage::hasWorkToComplete() const { + return static_cast<bool>(CurrentInstruction); +} bool EntryStage::isAvailable(const InstRef & /* unused */) const { if (CurrentInstruction) |