Issue 160256
Summary The problem of repeated definition in c++ projects
Labels new issue
Assignees
Reporter kdr521
    Recently, while working on a C++ project, I discovered a problem. My specific approach is that for each cpp file in the project, I will generate a corresponding IR file, then process this IR file to generate a new IR file, and finally generate an obj file. In this way, by linking all the OBJs, I can generate an exe file.

However, when I linked obj to generate an exe file, due to the fact that the IR file I generated contained some implementations of inline functions and library functions, it would lead to duplicate definitions, resulting in the failure of generating the exe file. I tried many methods, but none of them could retain only the function implementations I wrote myself during the IR file generation stage, and only keep the declarations of the others.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to