[llvm] [Orc][examples] Drop target triple from input for remote debugging test (PR #74831)

Stefan Gränitz via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 8 13:07:05 PST 2023


================
@@ -173,24 +174,15 @@ int main(int argc, char *argv[]) {
     TSMs.push_back(ExitOnErr(parseExampleModuleFromFile(Path)));
   }
 
-  StringRef TT;
+  std::string TT;
   StringRef MainModuleName;
   TSMs.front().withModuleDo([&MainModuleName, &TT](Module &M) {
     MainModuleName = M.getName();
     TT = M.getTargetTriple();
+    if (TT.empty())
+      TT = sys::getProcessTriple();
   });
 
-  for (const ThreadSafeModule &TSM : TSMs)
----------------
weliveindetail wrote:

When I added the example, I used it for experimentation with multiple IR inputs and I ran into a bug once that was related to a triple mismatch. That's why it checked the triples of all input files upfront. We could fix it to work with triple-less modules, but I didn't have the time today and I don't think it's worth it actually.

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


More information about the llvm-commits mailing list