[llvm] 9c54b42 - Fix warning of `-Wcast-qual`. NFC.
Michael Liao via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 28 08:36:57 PST 2020
Author: Michael Liao
Date: 2020-01-28T11:36:43-05:00
New Revision: 9c54b423380d33e58a325c588d305cf9ff1623f9
URL: https://github.com/llvm/llvm-project/commit/9c54b423380d33e58a325c588d305cf9ff1623f9
DIFF: https://github.com/llvm/llvm-project/commit/9c54b423380d33e58a325c588d305cf9ff1623f9.diff
LOG: Fix warning of `-Wcast-qual`. NFC.
Added:
Modified:
llvm/lib/Transforms/Utils/CodeMoverUtils.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/CodeMoverUtils.cpp b/llvm/lib/Transforms/Utils/CodeMoverUtils.cpp
index 19973165d25f..0f7f1e5b9579 100644
--- a/llvm/lib/Transforms/Utils/CodeMoverUtils.cpp
+++ b/llvm/lib/Transforms/Utils/CodeMoverUtils.cpp
@@ -61,7 +61,7 @@ class ControlConditions {
/// \p BB from \p Dominator. If \p MaxLookup is non-zero, it limits the
/// number of conditions to collect. Return None if not all conditions are
/// collected successfully, or we hit the limit.
- static Optional<const ControlConditions>
+ static const Optional<ControlConditions>
collectControlConditions(const BasicBlock &BB, const BasicBlock &Dominator,
const DominatorTree &DT,
const PostDominatorTree &PDT,
@@ -94,7 +94,7 @@ class ControlConditions {
};
} // namespace
-Optional<const ControlConditions> ControlConditions::collectControlConditions(
+const Optional<ControlConditions> ControlConditions::collectControlConditions(
const BasicBlock &BB, const BasicBlock &Dominator, const DominatorTree &DT,
const PostDominatorTree &PDT, unsigned MaxLookup) {
assert(DT.dominates(&Dominator, &BB) && "Expecting Dominator to dominate BB");
@@ -238,13 +238,13 @@ bool llvm::isControlFlowEquivalent(const BasicBlock &BB0, const BasicBlock &BB1,
<< " and " << BB1.getName() << " is "
<< CommonDominator->getName() << "\n");
- Optional<const ControlConditions> BB0Conditions =
+ const Optional<ControlConditions> BB0Conditions =
ControlConditions::collectControlConditions(BB0, *CommonDominator, DT,
PDT);
if (BB0Conditions == None)
return false;
- Optional<const ControlConditions> BB1Conditions =
+ const Optional<ControlConditions> BB1Conditions =
ControlConditions::collectControlConditions(BB1, *CommonDominator, DT,
PDT);
if (BB1Conditions == None)
More information about the llvm-commits
mailing list