[all-commits] [llvm/llvm-project] ab10f0: [CIR] Fix a crash when source location is unknown ...

Andy Kaylor via All-commits all-commits at lists.llvm.org
Fri Mar 6 12:04:05 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ab10f0848b22417afc6352051b6e26c7704084d2
      https://github.com/llvm/llvm-project/commit/ab10f0848b22417afc6352051b6e26c7704084d2
  Author: Andy Kaylor <akaylor at nvidia.com>
  Date:   2026-03-06 (Fri, 06 Mar 2026)

  Changed paths:
    M clang/lib/CIR/CodeGen/CIRGenFunction.cpp
    M clang/lib/CIR/CodeGen/CIRGenVTables.cpp
    M clang/test/CIR/CodeGen/thunks.cpp

  Log Message:
  -----------
  [CIR] Fix a crash when source location is unknown (#185059)

When we call `getLoc()` with an invalid `SourceLocation` and
`currSrcLoc` is also invalid, we were crashing or asserting. I tracked
down one case where this was happening (generating an argument in a
vtable thunk) and fixed that to provide a location. I also am updating
the `getLoc()` implementation so that it will use an unknown location in
release builds rather than crashing because the location isn't critical
for correct compilation.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list