================
@@ -2701,14 +2701,30 @@ static void markBuffersAsDontNeed(Ctx &ctx, bool 
skipLinkedOutput) {
 template <class ELFT>
 void LinkerDriver::compileBitcodeFiles(bool skipLinkedOutput) {
   llvm::TimeTraceScope timeScope("LTO");
+  // Capture the triple before moving the bitcode into the bitcode compiler.
+  // Note that this assumes that the set of possible libfuncs is roughly
+  // equivalent for all bitcode translation units.
+  std::optional<llvm::Triple> tt;
+  if (!ctx.bitcodeFiles.empty())
+    tt = llvm::Triple(ctx.bitcodeFiles.front()->obj->getTargetTriple());
----------------
ilovepi wrote:

can't all of this just move into the block below? I think you also can drop the 
optional, right, since if you only do this in that block there *has* to be a 
triple of some kind...

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

Reply via email to