================
@@ -1590,6 +1590,13 @@ class ASTReader
   void ParseLineTable(ModuleFile &F, const RecordData &Record);
   llvm::Error ReadSourceManagerBlock(ModuleFile &F);
   SourceLocation getImportLocation(ModuleFile *F);
+
+  /// If a relocation check happened, the optional holds a pointer to the
+  /// discovered Module. The second element determines whether to emit related
+  /// validation errors.
+  using RelocationCheckResult = std::pair<std::optional<Module *>, bool>;
+  RelocationCheckResult checkIfModuleRelocated(ModuleFile &F,
----------------
jansvoboda11 wrote:

This doesn't actually check if a module has been relocated, right? Maybe we 
should call this something like `getModuleForRelocationChecks()`? It might also 
be worth explaining the difference between `std::nullopt` and 
`std::optional(nullptr)` of the first member in the result.

https://github.com/llvm/llvm-project/pull/181836
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to