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

Maurice Heumann via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 16 11:55:17 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;
+}
+
----------------
momo5502 wrote:

I agree. However, I think the mapping for fastcc is determined by a table definition for each architecture. I feel like integrating this there is not easily feasible.

Do you have a recommendation on how this could be done better?

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


More information about the llvm-commits mailing list