summaryrefslogtreecommitdiff
path: root/llvm/lib/Support/OptimizedStructLayout.cpp
AgeCommit message (Collapse)Author
2022-12-18Include <optional> instead of "llvm/ADT/Optional.h"Kazu Hirata
This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2022-12-16[Support] llvm::Optional => std::optionalFangrui Song
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2022-12-15[NFC] Use std::optional over llvm::Optional to implement MaybeAlignGuillaume Chatelet
Differential Revision: https://reviews.llvm.org/D140098
2022-12-02[llvm] Use std::nullopt instead of None (NFC)Kazu Hirata
This patch mechanically replaces None with std::nullopt where the compiler would warn if None were deprecated. The intent is to reduce the amount of manual work required in migrating from Optional to std::optional. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2021-07-21Fix a bug in OptimizedStructLayout when filling gaps beforeJohn McCall
fixed fields with highly-aligned flexible fields. The code was not considering the possibility that aligning the current offset to the alignment of a queue might push us past the end of the gap. Subtracting the offsets to figure out the maximum field size for the gap then overflowed, making us think that we had nearly unbounded space to fill. Fixes PR 51131.
2020-04-10Rename OptimalLayout to OptimizedStructLayout at Chris's request.John McCall