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

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 8 09:49:08 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;
+}
+
----------------
zmodem wrote:

No PDB specific thoughts really, but it does sound redundant to store the calling convention in the debug info metadata as well (and error prone as it needs to stay in sync).

When we lower the debug metadata (or translate it to codeview), do we have an easy way to get to the llvm::Function? If so it sounds like we should just get the calling convention from there?

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


More information about the llvm-commits mailing list