[PATCH] D71374: Improve support of GNU mempcpy

Jim Lin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 12 01:21:28 PST 2019


Jim added inline comments.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2524
+    else
+      return RValue::get(Builder.CreateGEP(Dest.getPointer(), SizeVal));
   }
----------------
Is it an error here?

It should be:

```
if (BuiltinID == Builtin::BImempcpy ||
    BuiltinID == Builtin::BI__builtin_mempcpy)
    return RValue::get(Builder.CreateGEP(Dest.getPointer(), SizeVal));
else
    return RValue::get(Dest.getPointer());
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71374/new/

https://reviews.llvm.org/D71374





More information about the cfe-commits mailing list