Skip to content

Commit

Permalink
[OpaquePtr] Enumerate alloca type
Browse files Browse the repository at this point in the history
This is no longer implicitly enumerated through the pointer type.
  • Loading branch information
nikic committed Jun 25, 2021
1 parent 536872a commit 18d7e82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
Expand Up @@ -469,6 +469,8 @@ ValueEnumerator::ValueEnumerator(const Module &M,
EnumerateType(SVI->getShuffleMaskForBitcode()->getType());
if (auto *GEP = dyn_cast<GetElementPtrInst>(&I))
EnumerateType(GEP->getSourceElementType());
if (auto *AI = dyn_cast<AllocaInst>(&I))
EnumerateType(AI->getAllocatedType());
EnumerateType(I.getType());
if (const auto *Call = dyn_cast<CallBase>(&I)) {
EnumerateAttributes(Call->getAttributes());
Expand Down
2 changes: 2 additions & 0 deletions llvm/test/Other/force-opaque-ptrs.ll
Expand Up @@ -8,7 +8,9 @@

define void @f(i32* %p) {
; CHECK-LABEL: @f(
; CHECK-NEXT: [[A:%.*]] = alloca i17, align 4
; CHECK-NEXT: ret void
;
%a = alloca i17
ret void
}

0 comments on commit 18d7e82

Please sign in to comment.