mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-27 18:28:14 +00:00
ScopDetection: Make enum function-local
The 'Color' enum is only used for irreducible control flow detection. Johannes already moved this enum in r270054 from ScopDetection.h to ScopDetection.cpp to limit its scope to a single cpp file. We now move it into the only function where this enum is needed to make clear that it is only needed locally in this single function. Thanks to Johannes for pointing out this cleanup opportunity. llvm-svn: 272462
This commit is contained in:
parent
b05edfc10d
commit
ef6ae7030d
@ -1380,6 +1380,7 @@ void ScopDetection::emitMissedRemarks(const Function &F) {
|
||||
}
|
||||
}
|
||||
|
||||
bool ScopDetection::isReducibleRegion(Region &R, DebugLoc &DbgLoc) const {
|
||||
/// @brief Enum for coloring BBs in Region.
|
||||
///
|
||||
/// WHITE - Unvisited BB in DFS walk.
|
||||
@ -1387,7 +1388,6 @@ void ScopDetection::emitMissedRemarks(const Function &F) {
|
||||
/// BLACK - Visited and completely processed BB.
|
||||
enum Color { WHITE, GREY, BLACK };
|
||||
|
||||
bool ScopDetection::isReducibleRegion(Region &R, DebugLoc &DbgLoc) const {
|
||||
BasicBlock *REntry = R.getEntry();
|
||||
BasicBlock *RExit = R.getExit();
|
||||
// Map to match the color of a BasicBlock during the DFS walk.
|
||||
|
Loading…
Reference in New Issue
Block a user