mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Use the pass's "tag" for command-line options.
A pass has an ID (C++ identifier), Tag (shell identifier), and Name (human identifier). Command line options that identify passes should obviously be compatibile with with the pass' command line identifier. This is also what the user is used to typing for the -debug-only option.
This commit is contained in:
@@ -75,6 +75,12 @@ namespace swift {
|
||||
/// Get the name of the transform.
|
||||
llvm::StringRef getName() { return PassKindName(getPassKind()); }
|
||||
|
||||
/// Get the transform's (command-line) tag.
|
||||
llvm::StringRef getTag() { return PassKindTag(getPassKind()); }
|
||||
|
||||
/// Get the transform's name as a C++ identifier.
|
||||
llvm::StringRef getID() { return PassKindID(getPassKind()); }
|
||||
|
||||
protected:
|
||||
/// \brief Searches for an analysis of type T in the list of registered
|
||||
/// analysis. If the analysis is not found, the program terminates.
|
||||
|
||||
Reference in New Issue
Block a user