Add an opt out flag for constructor homing.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Looks alright to me. (bit awkward having a documented cc1 option - since the cc1 options aren't meant to be user facing - hadn't really thought about/noticed that when reviewing the documentation originally in D95911)
Oh, true. Since we're making ctor homing default maybe I should just make them user facing flags.
I have mixed feelings - on the one hand, yeah, we're changing the behavior of -fno-standalone-debug and giving people a tool to undo that change if it's problematic is good (less chance we have to churn through reverting the change, fixing, reapplying, etc, if there's a way to opt-out, at least in the short term). But equally I don't want to proliferate various rather arbitrary buckets of debug info type homing - I really want to encourage people to think of it as a fairly all-or-nothing situation, because I don't think there's a good way to explain/improve/modify/use the feature if it's "whatever is good enough for my use case". Especially now that there's the standalone_debug attribute that can be used to fix particular use cases where a type is needed across a -g0 boundary.
So... eh. Could go either way - your call, really. Though if we make it a full driver option, maybe a caveat that we may remove the functionality in the future (but that'll mean probably having to leave the flag in as a no-op/with some deprecation warning for some time after removing the functionality).
Yep, good point. Agree that it should be all-or-nothing but I feel like there might be other people in situations like in chrome mac/lldb or what @jmorse mentioned, where we use -fno-standalone-debug because it's impractical to use fstandalone-debug, and having a flag to keep the previous behavior is easier than having people make changes downstream.
Anyway, I think I'll leave it as a cc1 flag for now.