We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Originally reported in https://issues.chromium.org/issues/390537876.
The minimal testcase is at https://github.com/hokein/module-bugs/tree/main/undefine
$ CLANG=/llvm-project/build-debug/bin/clang ./run.sh $ ... util.cc:(.text._Z1fv[_Z1fv]+0x5): undefined reference to `void x<int>()' clang: error: linker command failed with exit code 1 (use -v to see invocation)
The text was updated successfully, but these errors were encountered:
@llvm/issue-subscribers-clang-modules
Author: Haojian Wu (hokein)
$ CLANG=/llvm-project/build-debug/bin/clang ./run.sh $ ... util.cc:(.text._Z1fv[_Z1fv]+0x5): undefined reference to `void x<int>()' clang: error: linker command failed with exit code 1 (use -v to see invocation)
Sorry, something went wrong.
Dumping the FD at the place
llvm-project/clang/lib/CodeGen/CodeGenAction.cpp
Line 294 in 38cb693
FunctionDecl 0x55fabe132e20 <util.cc:3:1, line:5:1> line:3:5 main 'int ()' `-CompoundStmt 0x55fabe1335f8 <col:12, line:5:1> `-CallExpr 0x55fabe1335d8 <line:4:3, col:5> 'void' `-ImplicitCastExpr 0x55fabe1335c0 <col:3> 'void (*)()' <FunctionToPointerDecay> `-DeclRefExpr 0x55fabe1330d0 <col:3> 'void ()' lvalue Function 0x55fabe132f70 'f' 'void ()' FunctionDecl 0x55fabe132f70 <./hoge.h:5:1, col:29> col:13 imported in hoge hidden used f 'void ()' inline `-CompoundStmt 0x55fabe133560 <col:17, col:29> `-CallExpr 0x55fabe133540 <col:19, col:26> 'void' `-ImplicitCastExpr 0x55fabe1334f8 <col:19, col:24> 'void (*)()' <FunctionToPointerDecay> `-DeclRefExpr 0x55fabe1330f0 <col:19, col:24> 'void ()' lvalue Function 0x55fabe1333e0 'x' 'void ()' (FunctionTemplate 0x55fabe133150 'x') FunctionDecl 0x55fabe1333e0 <./shared_ptr2.h:4:1, col:12> col:6 imported in hoge hidden used x 'void ()' implicit_instantiation `-TemplateArgument type 'int' `-BuiltinType 0x55fabe0d8e30 'int'
The x FunctionDecl is missing a function body, which causes the undefined symbol error in the linker.
x
No branches or pull requests
Originally reported in https://issues.chromium.org/issues/390537876.
The minimal testcase is at https://github.com/hokein/module-bugs/tree/main/undefine
The text was updated successfully, but these errors were encountered: