[NFC] Refactor getRenameDecl to use the request evaluator

Move `getRenameDecl` from `PrintAsObjC` into its own request so that
other components can re-use this functionality.
This commit is contained in:
Ben Barham
2021-07-17 09:04:58 +10:00
parent 35aa862e1d
commit f1c45de2a9
14 changed files with 185 additions and 139 deletions

View File

@@ -774,7 +774,6 @@ public:
void collectBasicSourceFileInfo(
llvm::function_ref<void(const BasicSourceFileInfo &)> callback) const;
public:
/// Retrieve a fingerprint value that summarizes the contents of this module.
///
/// This interface hash a of a module is guaranteed to change if the interface
@@ -787,6 +786,15 @@ public:
/// contents have been made.
Fingerprint getFingerprint() const;
/// Returns an approximation of whether the given module could be
/// redistributed and consumed by external clients.
///
/// FIXME: The scope of this computation should be limited entirely to
/// RenamedDeclRequest. Unfortunately, it has been co-opted to support the
/// \c SerializeOptionsForDebugging hack. Once this information can be
/// transferred from module files to the dSYMs, remove this.
bool isExternallyConsumed() const;
SourceRange getSourceRange() const { return SourceRange(); }
static bool classof(const DeclContext *DC) {