Skip to content

Commit 17ff158

Browse files
committed
Update comment, add assert for loads-into-fake-uses
1 parent 804d966 commit 17ff158

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

clang/lib/CodeGen/CGCall.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3612,6 +3612,8 @@ static llvm::StoreInst *findDominatingStoreToReturnValue(CodeGenFunction &CGF) {
36123612

36133613
if (II->getIntrinsicID() == llvm::Intrinsic::fake_use) {
36143614
LoadIntoFakeUse = dyn_cast<llvm::Instruction>(II->getArgOperand(0));
3615+
assert(isa<llvm::LoadInst>(LoadIntoFakeUse) &&
3616+
"Expected fake use operand to be a load instruction.");
36153617
continue;
36163618
}
36173619
}

clang/lib/CodeGen/CGCleanup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class EHScope {
8787
LLVM_PREFERRED_TYPE(bool)
8888
unsigned IsLifetimeMarker : 1;
8989

90-
/// Whether this cleanup is a fake use
90+
/// Whether this cleanup is a fake use.
9191
LLVM_PREFERRED_TYPE(bool)
9292
unsigned IsFakeUse : 1;
9393

0 commit comments

Comments
 (0)