[all-commits] [llvm/llvm-project] a56ca1: [clang][codegen] Fix possible crash when setting T...
Benjamin Maxwell via All-commits
all-commits at lists.llvm.org
Sun Sep 15 05:41:47 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a56ca1a0fb248c6f38b5841323a74673748f43ea
https://github.com/llvm/llvm-project/commit/a56ca1a0fb248c6f38b5841323a74673748f43ea
Author: Benjamin Maxwell <benjamin.maxwell at arm.com>
Date: 2024-09-15 (Sun, 15 Sep 2024)
Changed paths:
M clang/lib/CodeGen/CGBuiltin.cpp
Log Message:
-----------
[clang][codegen] Fix possible crash when setting TBAA metadata on FP math libcalls (#108575)
There's currently no code path that can reach this crash, but:
```
Instruction *Inst = cast<llvm::Instruction>(Call.getScalarVal());
```
fails if the call returns `void`. This could happen if a builtin for
something like `void sincos(double, double*, double*)` is added to
clang.
Instead, use the `llvm::CallBase` returned from `EmitCall()` to set the
TBAA metadata, which should exist no matter the return type.
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