[clang] [llvm] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

Alexander Richardson via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 21 17:09:46 PDT 2024


================
@@ -792,13 +792,14 @@ EncompassingIntegerType(ArrayRef<struct WidthAndSignedness> Types) {
 
 Value *CodeGenFunction::EmitVAStartEnd(Value *ArgValue, bool IsStart) {
   Intrinsic::ID inst = IsStart ? Intrinsic::vastart : Intrinsic::vaend;
-  return Builder.CreateCall(CGM.getIntrinsic(inst), ArgValue);
+  return Builder.CreateCall(CGM.getIntrinsic(inst, {ArgValue->getType()}),
+                            ArgValue);
 }
 
 /// Checks if using the result of __builtin_object_size(p, @p From) in place of
 /// __builtin_object_size(p, @p To) is correct
 static bool areBOSTypesCompatible(int From, int To) {
-  // Note: Our __builtin_object_size implementation currently treats Type=0 and
+  // Note: Our __builtin_object_size implementation currently treats Type=0 andV
----------------
arichardson wrote:

```suggestion
  // Note: Our __builtin_object_size implementation currently treats Type=0 and
```
typo

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


More information about the cfe-commits mailing list