runtime: blanket application of namespacing and inclusion of new

Apply a blanket pass of including `new` for the placement new allocation
and namespacing the call to the global placement new allocator.  This
should repair the Android ARMv7 builds.
This commit is contained in:
Saleem Abdulrasool
2022-04-14 14:20:03 -07:00
parent 57f0e67658
commit a8b0ee24dc
18 changed files with 44 additions and 27 deletions

View File

@@ -14,6 +14,8 @@
#include "swift/ABI/Metadata.h"
#include "swift/Runtime/HeapObject.h"
#include <new>
using namespace swift;
using namespace llvm;
@@ -59,7 +61,7 @@ AutoDiffLinearMapContext *swift::swift_autoDiffCreateLinearMapContext(
sizeof(AutoDiffLinearMapContext), alignof(AutoDiffLinearMapContext))
+ topLevelLinearMapStructSize;
auto *buffer = (AutoDiffLinearMapContext *)malloc(allocationSize);
return new (buffer) AutoDiffLinearMapContext;
return ::new (buffer) AutoDiffLinearMapContext;
}
void *swift::swift_autoDiffProjectTopLevelSubcontext(