Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
llvm インライン化の仕組み (Inliner クラス) を理解しようとしています。私が理解していない操作は次のとおりです。
SmallVector<std::pair<CallSite, int>, 16> CallSites;
SmallVector が llvm クラスの場合。特に、このコードの「16」の機能が何なのかわかりません..
16 要素の を宣言しておりSmallVector、各要素はstd::pair<CallSite, int>です。
SmallVector
std::pair<CallSite, int>
編集: Eli が正しく指摘したように、SmallVector は動的にサイズ変更できます。16 は単なる組み込みサイズです (これは、最大 16 個の要素を格納してもヒープ割り当てが発生しないことを意味します)。