[llvm] [GlobalOpt] Update debug info when changing CC to Fast (PR #144303)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 9 09:48:21 PDT 2025


================
@@ -1920,6 +1920,14 @@ static void RemovePreallocated(Function *F) {
   }
 }
 
+static unsigned char GetDebugInfoFastCC(const Triple &Triple) {
+  if (Triple.isOSWindows() && Triple.isArch32Bit()) {
+    return llvm::dwarf::DW_CC_BORLAND_msfastcall;
+  }
+
+  return llvm::dwarf::DW_CC_normal;
+}
+
----------------
dwblaikie wrote:

Yeah - I'm not 100% sure we carry CC on declarations, so someone'd have to check that/see if we need it anyway. And if we do, yeah, checking for consistency would be good - and maybe the metadata would/could carry the same type of CC as the IR, rather than the debug info one - and then only convert from real CC to DWARF CC at the backend.

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


More information about the llvm-commits mailing list