CFI (only in the cross-dso mode) fails to set !type annotations when
a function is used before it is defined.
Details
Details
- Reviewers
pcc
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/CodeGen/CodeGenModule.cpp | ||
---|---|---|
934 | It looks like we can get here with declarations that are not of type FunctionDecl (mostly via SetInternalFunctionAttributes -- see http://llvm-cs.pcc.me.uk/tools/clang/lib/CodeGen/CodeGenModule.cpp/rSetInternalFunctionAttributes). I suppose that either means you would need to tolerate null pointers in CreateFunctionTypeMetadata or add an isa check here. Please also add a test for one of those cases. |
It looks like we can get here with declarations that are not of type FunctionDecl (mostly via SetInternalFunctionAttributes -- see http://llvm-cs.pcc.me.uk/tools/clang/lib/CodeGen/CodeGenModule.cpp/rSetInternalFunctionAttributes). I suppose that either means you would need to tolerate null pointers in CreateFunctionTypeMetadata or add an isa check here.
Please also add a test for one of those cases.