aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@amd.com>2021-10-07 10:38:38 +0100
committerJay Foad <jay.foad@amd.com>2021-10-07 19:08:01 +0100
commit548b01c7a6d3193d38f16942acc7804dbaf32ee2 (patch)
tree38c1ded199236505a3c9041ae255eb209c8631d8 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent7f93bb4a5827ffce67a469da3ac0e23194538441 (diff)
downloadllvm-548b01c7a6d3193d38f16942acc7804dbaf32ee2.zip
llvm-548b01c7a6d3193d38f16942acc7804dbaf32ee2.tar.gz
llvm-548b01c7a6d3193d38f16942acc7804dbaf32ee2.tar.bz2
[MIRParser] Add support for IsInlineAsmBrIndirectTarget
Print this basic block flag as inlineasm-br-indirect-target and parse it. This allows you to write MIR test cases for INLINEASM_BR. The test case I added is one that I wanted to precommit anyway for D110834. Differential Revision: https://reviews.llvm.org/D111291
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineBasicBlock.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp
index c6914dc..2a6cd19 100644
--- a/llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -517,6 +517,11 @@ void MachineBasicBlock::printName(raw_ostream &os, unsigned printNameFlags,
os << "landing-pad";
hasAttributes = true;
}
+ if (isInlineAsmBrIndirectTarget()) {
+ os << (hasAttributes ? ", " : " (");
+ os << "inlineasm-br-indirect-target";
+ hasAttributes = true;
+ }
if (isEHFuncletEntry()) {
os << (hasAttributes ? ", " : " (");
os << "ehfunclet-entry";