Skip to content

Commit aa4ccd6

Browse files
committed
CodeGenTBAA: getAnyPtr: add extra comment describing AnyPtrs
1 parent f516639 commit aa4ccd6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang/lib/CodeGen/CodeGenTBAA.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ llvm::MDNode *CodeGenTBAA::getChar() {
8383
llvm::MDNode *CodeGenTBAA::getAnyPtr(unsigned PtrDepth) {
8484
assert(PtrDepth >= 1 && "Pointer must have some depth");
8585

86+
// Populate at least PtrDepth elements in AnyPtrs. These are the type nodes
87+
// for "any" pointers of increasing pointer depth, and are organized in the
88+
// hierarchy: any pointer <- any p2 pointer <- any p3 pointer <- ...
8689
if (AnyPtrs.size() < PtrDepth) {
8790
AnyPtrs.reserve(PtrDepth);
8891
auto Size = Module.getDataLayout().getPointerSize();

0 commit comments

Comments
 (0)