diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2014-05-01 15:21:03 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2014-05-01 15:21:03 +0000 |
| commit | f3fa16f5bfb9439249f87b27d80b6d2fb4aa3692 (patch) | |
| tree | a7b4a775d39db66d930a68aaf426fe370bf8f67e /utils | |
| parent | 0d40b638c5261b43c99d36f8045757fb494d9871 (diff) | |
| download | clang-f3fa16f5bfb9439249f87b27d80b6d2fb4aa3692.tar.gz clang-f3fa16f5bfb9439249f87b27d80b6d2fb4aa3692.tar.bz2 clang-f3fa16f5bfb9439249f87b27d80b6d2fb4aa3692.tar.xz | |
Fixing a FIXME -- no longer using std::memcpy, since that would fail for non-trivial types. Replaced with std::copy. No functional changes intended since all uses of this functionality either use pointers or integers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207766 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
| -rw-r--r-- | utils/TableGen/ClangAttrEmitter.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/utils/TableGen/ClangAttrEmitter.cpp b/utils/TableGen/ClangAttrEmitter.cpp index e03afe4ecc..8e06b51326 100644 --- a/utils/TableGen/ClangAttrEmitter.cpp +++ b/utils/TableGen/ClangAttrEmitter.cpp @@ -537,9 +537,8 @@ namespace { << "A->" << getLowerName() << "_size()"; } void writeCtorBody(raw_ostream &OS) const override { - // FIXME: memcpy is not safe on non-trivial types. - OS << " std::memcpy(" << getLowerName() << ", " << getUpperName() - << ", " << getLowerName() << "Size * sizeof(" << getType() << "));\n"; + OS << " std::copy(" << getUpperName() << ", " << getUpperName() + << " + " << getLowerName() << "Size, " << getLowerName() << ");"; } void writeCtorInitializers(raw_ostream &OS) const override { OS << getLowerName() << "Size(" << getUpperName() << "Size), " |
