Skip to content

Commit 600dfea

Browse files
committed
1 parent 458cb66 commit 600dfea

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
diff --git a/llvm/include/llvm/CodeGen/AsmPrinterHandler.h b/llvm/include/llvm/CodeGen/AsmPrinterHandler.h
2+
index bf3f6c53027a..0d13f8be0865 100644
3+
--- a/llvm/include/llvm/CodeGen/AsmPrinterHandler.h
4+
+++ b/llvm/include/llvm/CodeGen/AsmPrinterHandler.h
5+
@@ -74,8 +74,6 @@ public:
6+
/// Process end of an instruction.
7+
virtual void endInstruction() {}
8+
9+
- virtual void beginCodeAlignment(const MachineBasicBlock &MBB) {}
10+
-
11+
/// Emit target-specific EH funclet machinery.
12+
virtual void beginFunclet(const MachineBasicBlock &MBB,
13+
MCSymbol *Sym = nullptr) {}
14+
diff --git a/llvm/include/llvm/CodeGen/DebugHandlerBase.h b/llvm/include/llvm/CodeGen/DebugHandlerBase.h
15+
index 17764b31f30e..59a67c245455 100644
16+
--- a/llvm/include/llvm/CodeGen/DebugHandlerBase.h
17+
+++ b/llvm/include/llvm/CodeGen/DebugHandlerBase.h
18+
@@ -128,6 +128,7 @@ public:
19+
void beginFunction(const MachineFunction *MF) override;
20+
void endFunction(const MachineFunction *MF) override;
21+
22+
+
23+
void beginBasicBlockSection(const MachineBasicBlock &MBB) override;
24+
void endBasicBlockSection(const MachineBasicBlock &MBB) override;
25+
26+
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
27+
index 6d510d11c38e..676d99fb8e64 100644
28+
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
29+
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
30+
@@ -1975,8 +1975,11 @@ void AsmPrinter::emitFunctionBody() {
31+
Handler->markFunctionEnd();
32+
for (auto &Handler : EHHandlers)
33+
Handler->markFunctionEnd();
34+
- // Update the end label of the entry block's section.
35+
- MBBSectionRanges[MF->front().getSectionID()].EndLabel = CurrentFnEnd;
36+
+
37+
+ assert(!MBBSectionRanges.contains(MF->front().getSectionID()) &&
38+
+ "Overwrite section range");
39+
+ MBBSectionRanges[MF->front().getSectionID()] =
40+
+ MBBSectionRange{CurrentFnBegin, CurrentFnEnd};
41+
42+
// Print out jump tables referenced by the function.
43+
emitJumpTableInfo();
44+
@@ -3971,9 +3974,6 @@ void AsmPrinter::emitBasicBlockStart(const MachineBasicBlock &MBB) {
45+
CurrentSectionBeginSym = MBB.getSymbol();
46+
}
47+
48+
- for (auto &Handler : Handlers)
49+
- Handler->beginCodeAlignment(MBB);
50+
-
51+
// Emit an alignment directive for this block, if needed.
52+
const Align Alignment = MBB.getAlignment();
53+
if (Alignment != Align(1))

0 commit comments

Comments
 (0)