Small fix - never hurts to have things initialized.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/include/llvm/Analysis/InlineCost.h | ||
---|---|---|
163 | why is 0 a meaningful default value to start with? |
llvm/include/llvm/Analysis/InlineCost.h | ||
---|---|---|
163 | My goal was to ensure the fields are initialized, to avoid nasty-to-debug uninitialized value bugs; so I picked 0 as the natural thing to initialize with. Happy to change to a different value. |
llvm/include/llvm/Analysis/InlineCost.h | ||
---|---|---|
163 | how about initializing it to some illegal value such as -1 to indicate it is not logically initialized |
why is 0 a meaningful default value to start with?