[PATCH] D77877: [llvm][NFC] Inliner.cpp: ensure InlineHistory ID is always initialized;

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 10:38:34 PDT 2020


davidxl added a comment.

Lazy declaration is commonly used in C++ code. In general it has the advantage of limiting the life ranges of locals and reduce register pressure.   Here we have a lazy declaration and also a lazy initialization but scoped, making the declaration also scoped can avoid introducing uninitialized variable use accidentally in the future.

On the other hand, I don't have strong opinion on this so it is up to you.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77877/new/

https://reviews.llvm.org/D77877





More information about the llvm-commits mailing list