[llvm] [AMDGPU] Fix .Lfunc_end label placement (PR #127549)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 17 18:07:45 PST 2025


================
@@ -90,6 +91,24 @@ extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAMDGPUAsmPrinter() {
                                      createAMDGPUAsmPrinterPass);
 }
 
+namespace {
+class AMDGPUAsmPrinterHandler : public AsmPrinterHandler {
+protected:
+  AMDGPUAsmPrinter *Asm;
+
+public:
+  AMDGPUAsmPrinterHandler(AMDGPUAsmPrinter *A) : Asm(A) {}
+
+  virtual void beginFunction(const MachineFunction *MF) override {}
+
+  virtual void endFunction(const MachineFunction *MF) override {
+    Asm->endFunction(MF);
+  }
+
+  virtual void endModule() override {}
----------------
arsenm wrote:

```suggestion
  void beginFunction(const MachineFunction *MF) override {}

  void endFunction(const MachineFunction *MF) override {
    Asm->endFunction(MF);
  }

  void endModule() override {}
```

No virtual with override 

https://github.com/llvm/llvm-project/pull/127549


More information about the llvm-commits mailing list