We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0db6b47 commit 76b10c1Copy full SHA for 76b10c1
llvm/lib/CodeGen/CFIInstrInserter.cpp
@@ -319,10 +319,13 @@ void CFIInstrInserter::calculateOutgoingCFAInfo(MBBCFAInfo &MBBInfo) {
319
case MCCFIInstruction::OpValOffset:
320
break;
321
}
322
+ assert((bool)CSRReg + (bool)CSROffset <= 1 &&
323
+ "A register can only be at an offset from CFA or in another "
324
+ "register, but not both!");
325
CSRSavedLocation CSRLoc;
326
if (CSRReg)
327
CSRLoc = CSRSavedLocation::createRegister(*CSRReg);
- if (CSROffset)
328
+ else if (CSROffset)
329
CSRLoc = CSRSavedLocation::createCFAOffset(*CSROffset);
330
if (CSRLoc.isValid()) {
331
auto It = CSRLocMap.find(CFI.getRegister());
0 commit comments