- __cfi_check gets a 3rd argument: ubsan handler data
- instead of trapping on failure, call __cfi_check_fail which must be present in the module (generated in the frontend).
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
It doesn't need to be done now, but I think we should consider moving most of the functionality from this pass to Clang. We could consider introducing an intrinsic that looks like this:
i1 @llvm.bitset.test.i64(i8* %addr, i64 %id)
Then Clang can emit a __cfi_check function with weak-odr linkage that uses this intrinsic.
lib/Transforms/IPO/CrossDSOCFI.cpp | ||
---|---|---|
115 | Type::getInt8PtrTy | |
131 | Use getOrCreateFunction, the function could be defined externally or have a different signature. | |
test/Transforms/CrossDSOCFI/basic.ll | ||
16 | CHECK-NEXT |
Type::getInt8PtrTy