================
@@ -28,6 +52,31 @@ static Error handleArgs(const CommonConfig &Config, Object 
&Obj) {
       return Config.ToRemove.matches(P.Name);
     };
 
+  if (!Config.SplitSection.empty()) {
+    for (StringRef Flag : Config.SplitSection) {
+      StringRef SectionName;
+      StringRef FileName;
+      std::tie(SectionName, FileName) = Flag.split('=');
+
+      if (Error E = splitPartAsObject(SectionName, FileName,
+                                      Config.InputFilename, Obj))
+        return E;
+    }
+
+    RemovePred = [&Config, RemovePred](const Part &P) {
+      if (RemovePred(P))
+        return true;
+
+      for (StringRef Flag : Config.SplitSection) {
+        StringRef SectionName = Flag.take_front(Flag.find('='));
+        if (P.Name == SectionName)
+          return true;
----------------
hekota wrote:

```suggestion
        if (Flag.starts_with(P.Name) && Flag[P.Name.size()] == '=')
          return true;
```

https://github.com/llvm/llvm-project/pull/153265
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to