/// FreeArgumentList - Free the argument list of the macro, restoring it to a
/// state where it can be reused for other devious purposes.
- void FreeArgumentList(llvm::BumpPtrAllocator &PPAllocator) {
- PPAllocator.Deallocate(ArgumentList);
+ void FreeArgumentList() {
ArgumentList = 0;
NumArguments = 0;
}
/// Destroy - destroy this MacroInfo object.
- void Destroy(llvm::BumpPtrAllocator &PPAllocator) {
- FreeArgumentList(PPAllocator);
+ void Destroy() {
+ FreeArgumentList();
this->~MacroInfo();
}
/// ReleaseMacroInfo - Release the specified MacroInfo. This memory will
/// be reused for allocating new MacroInfo objects.
-void Preprocessor::ReleaseMacroInfo(MacroInfo* MI) {
+void Preprocessor::ReleaseMacroInfo(MacroInfo *MI) {
MICache.push_back(MI);
- MI->FreeArgumentList(BP);
+ MI->FreeArgumentList();
}
// will be released when the BumpPtrAllocator 'BP' object gets
// destroyed. We still need to run the dtor, however, to free
// memory alocated by MacroInfo.
- I->second->Destroy(BP);
+ I->second->Destroy();
I->first->setHasMacroDefinition(false);
}
for (std::vector<MacroInfo*>::iterator I = MICache.begin(),
// will be released when the BumpPtrAllocator 'BP' object gets
// destroyed. We still need to run the dtor, however, to free
// memory alocated by MacroInfo.
- (*I)->Destroy(BP);
+ (*I)->Destroy();
}
// Free any cached macro expanders.