[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

Ellis Hoag via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Oct 21 09:42:51 PDT 2024


================
@@ -1168,9 +1168,19 @@ Expected<std::string> parseMemProfUsePassOptions(StringRef Params) {
   return Result;
 }
 
-Expected<bool> parseStructuralHashPrinterPassOptions(StringRef Params) {
-  return PassBuilder::parseSinglePassOption(Params, "detailed",
-                                            "StructuralHashPrinterPass");
+Expected<StructuralHashOptions>
+parseStructuralHashPrinterPassOptions(StringRef Params) {
+  if (Params.empty())
+    return StructuralHashOptions::None;
+  else if (Params == "detailed")
+    return StructuralHashOptions::Detailed;
+  else if (Params == "call-target-ignored")
+    return StructuralHashOptions::CallTargetIgnored;
+  else
----------------
ellishg wrote:

```suggestion
  if (Params == "detailed")
    return StructuralHashOptions::Detailed;
  if (Params == "call-target-ignored")
    return StructuralHashOptions::CallTargetIgnored;
```

https://github.com/llvm/llvm-project/pull/112638


More information about the llvm-branch-commits mailing list