[PATCH] D44898: [ELF] Fix incorrect deduplication of MergeSyntheticSection's

Rafael Avila de Espindola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 26 09:19:37 PDT 2018


espindola added inline comments.


================
Comment at: ELF/SyntheticSections.cpp:2442
+  size_t Size = Builder.getSize();
+  uint8_t *Buf = new (BAlloc) uint8_t[Size];
+  Data = ArrayRef<uint8_t>(Buf, Size);
----------------
At least clang is not finding an operator new[] to use. I had to manually call the Allocate function for this to build:

new (BAlloc.Allocate<uint8_t>(Size)) uint8_t[Size]

I guess we could also add new[] to Support/Allocator.h


https://reviews.llvm.org/D44898





More information about the llvm-commits mailing list