Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
| lib/CodeGen/CGClass.cpp | ||
|---|---|---|
| 1373 ↗ | (On Diff #30964) | It's not the callback that is being optimized away. The optimization avoids allocating a new frame for the callback function, making the destructor frame to disappear from the stack trace. |
| 1389 ↗ | (On Diff #30964) | Why not SetTailCall() on the new call instruction? |
| test/CodeGenCXX/sanitize-dtor-tail-call.cpp | ||
| 2 ↗ | (On Diff #30964) | try adding -disable-llvm-optzns flag to avoid running any optimizations and testing the IR right out of the frontend |
| 19 ↗ | (On Diff #30964) | You can check the lack of a tail on an instruction like this: CHECK: {{^ *}}call ... |
| lib/CodeGen/CGClass.cpp | ||
|---|---|---|
| 1389 ↗ | (On Diff #30964) | When I did that, it was still emitting tail calls |
| cfe/trunk/test/CodeGenCXX/sanitize-dtor-tail-call.cpp | ||
|---|---|---|
| 17 | I don't think this check verifies what you want it to verify... you need to order it like this: // CHECK-NOT: {{\s*}}tail call void @__sanitizer_dtor_callback
// CHECK: {{\s*}}call void @__sanitizer_dtor_callback
// CHECK-NOT: {{\s*}}call void @__sanitizer_dtor_callbackor better yet: // CHECK: {{^ +}}call void @__sanitizer_dtor_callback
// CHECK-NOT: call void @__sanitizer_dtor_callback | |
| cfe/trunk/test/CodeGenCXX/sanitize-dtor-tail-call.cpp | ||
|---|---|---|
| 17 | The final committed version reflects your suggested changes. I'm not sure why they're not showing up here- I had some difficulty squashing my local commits into a single commit for the remote. | |
I don't think this check verifies what you want it to verify... you need to order it like this:
// CHECK-NOT: {{\s*}}tail call void @__sanitizer_dtor_callback // CHECK: {{\s*}}call void @__sanitizer_dtor_callback // CHECK-NOT: {{\s*}}call void @__sanitizer_dtor_callbackor better yet:
// CHECK: {{^ +}}call void @__sanitizer_dtor_callback // CHECK-NOT: call void @__sanitizer_dtor_callback