diff options
author | paperchalice <liujunchang97@outlook.com> | 2024-06-28 14:48:09 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-28 14:48:09 +0800 |
commit | c931ac5994c4f896f0db03c425924ed38601252a (patch) | |
tree | 75935e3bbfcdafd0adafab70410ad53749bb3908 /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | 9df71d7673b5c98e1032d01be83724a45b42fafc (diff) | |
download | llvm-c931ac5994c4f896f0db03c425924ed38601252a.zip llvm-c931ac5994c4f896f0db03c425924ed38601252a.tar.gz llvm-c931ac5994c4f896f0db03c425924ed38601252a.tar.bz2 |
Reapply "[CodeGen] Introduce `MachineDomTreeUpdater`" (#96846) (#96851)
This reverts commit 0f8849349ae3d3f2f537ad6ab233a586fb39d375.
Resolve conflict in `MachinePostDominators.h` There is a conflict after
merging #96378, resolved in #96852. Both PRs modified
`MachinePostDominators.h` and triggered build failure.
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index abf43e3..533ab7c 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -315,6 +315,12 @@ bool MachineBasicBlock::isLegalToHoistInto() const { return true; } +bool MachineBasicBlock::hasName() const { + if (const BasicBlock *LBB = getBasicBlock()) + return LBB->hasName(); + return false; +} + StringRef MachineBasicBlock::getName() const { if (const BasicBlock *LBB = getBasicBlock()) return LBB->getName(); |