Skip to content

Commit c6ff653

Browse files
committed
Add some comments
1 parent fc9a517 commit c6ff653

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llvm/include/llvm/IR/GEPNoWrapFlags.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515

1616
namespace llvm {
1717

18+
/// Represents flags for the getelementptr instruction/expression.
19+
/// The following flags are supported:
20+
/// * inbounds (implies nusw)
21+
/// * nusw (no unsigned signed wrap)
22+
/// * nuw (no unsigned wrap)
23+
/// See LangRef for a description of their semantics.
1824
class GEPNoWrapFlags {
1925
enum : unsigned {
2026
InBoundsFlag = (1 << 0),
@@ -31,6 +37,7 @@ class GEPNoWrapFlags {
3137
public:
3238
GEPNoWrapFlags() : Flags(0) {}
3339
// For historical reasons, interpret plain boolean as InBounds.
40+
// TODO: Migrate users to pass explicit GEPNoWrapFlags and remove this ctor.
3441
GEPNoWrapFlags(bool IsInBounds)
3542
: Flags(IsInBounds ? (InBoundsFlag | NUSWFlag) : 0) {}
3643

0 commit comments

Comments
 (0)