Skip to content

Commit 9f8b6eb

Browse files
committed
AS
1 parent 336b9bc commit 9f8b6eb

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

llvm/lib/CodeGen/MIRParser/MIParser.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ bool PerTargetMIParsingState::getRegisterByName(StringRef RegName,
130130
bool PerTargetMIParsingState::getVRegFlagValue(StringRef FlagName,
131131
uint8_t &FlagValue) const {
132132
const auto *TRI = Subtarget.getRegisterInfo();
133-
auto FV = TRI->getVRegFlagValue(FlagName);
134-
if (!FV.has_value())
133+
std::optional<uint8_t> FV = TRI->getVRegFlagValue(FlagName);
134+
if (!FV)
135135
return true;
136-
FlagValue = FV.value();
136+
FlagValue = *FV;
137137
return false;
138138
}
139139

llvm/test/CodeGen/MIR/Generic/register-flag-error.mir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: not llc -run-pass=none -o - %s 2>&1 | FileCheck %s --check-prefix=ERR
1+
# RUN: not llc -run-pass=none -filetype=null %s 2>&1 | FileCheck %s --check-prefix=ERR
22

33
---
44
name: flags
@@ -10,4 +10,4 @@ body: |
1010
%0 = G_ADD $w0, $w0
1111
...
1212
# ERR: use of undefined register flag
13-
# ERR: VFLAG_ERR
13+
# ERR: VFLAG_ERR

0 commit comments

Comments
 (0)