Skip to content

Commit 1389c41

Browse files
committed
Revert "Always use malloc/free for allocation of SIL instructions."
This reverts commit a312dad.
1 parent 25e310c commit 1389c41

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/SIL/SILModule.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,10 @@ void *SILModule::allocate(unsigned Size, unsigned Align) const {
132132
}
133133

134134
void *SILModule::allocateInst(unsigned Size, unsigned Align) const {
135-
return AlignedAlloc(Size, Align);
135+
if (true || getASTContext().LangOpts.UseMalloc)
136+
return AlignedAlloc(Size, Align);
137+
138+
return BPA.Allocate(Size, Align);
136139
}
137140

138141
SILWitnessTable *

0 commit comments

Comments
 (0)