[PATCH] D33870: Expose IRMover flag

Ben Karel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 12:41:52 PDT 2017


eschew added a comment.

I'm almost certain the bug was in my frontend's misuse of LLVM's linking infrastructure, not a bug in linking itself (per se).

My frontend first constructs a shell Module with declarations for the language's runtime functions, then codegens into the shell, then links the shell with the runtime. It was constructing the shell from a precompiled bitcode by iterating over the runtime's Module and calling shell->getOrInsertFunction(...) providing *a type from the runtime Module*.  I'm guessing mixing types like that between modules isn't kosher. The workaround/fix is to round-trip the constructed shell through bitcode.

What I'm confused about is: what does the OnlyNamed flag (in TypeFinder.cpp) actually do, from the perspective of LLVM IR?


Repository:
  rL LLVM

https://reviews.llvm.org/D33870





More information about the llvm-commits mailing list