[all-commits] [llvm/llvm-project] 7ecb7e: [MLIR] UnknownLoc on Inlinable Calls in LLVMIR Tra...

Ian Bearman via All-commits all-commits at lists.llvm.org
Tue Mar 15 14:51:03 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ecb7efc898981c980a1ce50f0ef32b337e66bb9
      https://github.com/llvm/llvm-project/commit/7ecb7efc898981c980a1ce50f0ef32b337e66bb9
  Author: Ian Bearman <ianb at microsoft.com>
  Date:   2022-03-15 (Tue, 15 Mar 2022)

  Changed paths:
    M mlir/lib/Target/LLVMIR/DebugTranslation.cpp
    M mlir/test/Target/LLVMIR/llvmir-debug.mlir

  Log Message:
  -----------
  [MLIR] UnknownLoc on Inlinable Calls in LLVMIR Translation

During MLIR translation to LLVMIR if an inlineable call has an UnkownLoc we get this error message:

```
inlinable function call in a function with debug info must have a !dbg location
  call void @callee()
```

There is code that checks for this case and strips debug information to avoid this situation. I'm expanding this code to handle the case where an debug location points at a UnknownLoc. For example, a NamedLoc whose child location is an UnknownLoc.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D121633




More information about the All-commits mailing list