[clang] [CIR] Add NYI cases to builtin switch statement and move existing cases into functions (PR #168699)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 19 11:22:28 PST 2025


https://github.com/andykaylor requested changes to this pull request.

Thanks for doing this!

I appreciate the restructuring, but this is going to cause some problems for builtins that have a 1:1 mapping to library calls. Currently, we have a block of code following the switch statement to call the library function for cases that weren't previously handled.

```
  // If this is an alias for a lib function (e.g. __builtin_sin), emit
  // the call using the normal call path, but using the unmangled
  // version of the function name.
  if (getContext().BuiltinInfo.isLibFunction(builtinID))
    return emitLibraryCall(*this, fd, e,
                           cgm.getBuiltinLibFunction(fd, builtinID));
```
If you put that inside of `errorBuiltinNYI` with a comment explaining that it's a temporary workaround, that will keep us from regressing on a bunch of tests that are currently passing in the llvm-test-suite.

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


More information about the cfe-commits mailing list