[PATCH] D139924: LTO C API: always parse modules in opaque pointer mode.

Steven Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 19 16:03:37 PST 2022


steven_wu added inline comments.


================
Comment at: llvm/tools/lto/lto.cpp:138
+  void init() {
+    OwnedContext->setOpaquePointers(true);
+    setDiagnosticHandler(handleLibLTODiagnostic, nullptr);
----------------
w2yehia wrote:
> lenary wrote:
> > dmgreen wrote:
> > > Hi - We noticed from out downstream embedded linker that this can be null if it comes in via lto_codegen_create, as opposed to lto_codegen_create_in_local_context.
> > We got downstream failures from this patch, because OwnedContext can be null here (if you use the first constructor on line 127, above).
> > 
> > I think maybe my suggestion is less falliable, but alters global state, so I'm not sure it's right either. It should at least work when OwnedContext is null, because the LTOCodeGenerator will still have a context to return (the global one)
> this is breaking the AIX linker too - for the same reasons as above.
Reverted in `3a5426f57243`.

It is likely this is not needed anymore. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139924/new/

https://reviews.llvm.org/D139924



More information about the llvm-commits mailing list