forked from OSchip/llvm-project
Fix a memory leak of PragmaNamespaces, rdar://10611796.
llvm-svn: 147635
This commit is contained in:
parent
ae920b69f5
commit
7ce752610f
|
@ -714,8 +714,10 @@ void Preprocessor::RemovePragmaHandler(StringRef Namespace,
|
|||
|
||||
// If this is a non-default namespace and it is now empty, remove
|
||||
// it.
|
||||
if (NS != PragmaHandlers && NS->IsEmpty())
|
||||
if (NS != PragmaHandlers && NS->IsEmpty()) {
|
||||
PragmaHandlers->RemovePragmaHandler(NS);
|
||||
delete NS;
|
||||
}
|
||||
}
|
||||
|
||||
bool Preprocessor::LexOnOffSwitch(tok::OnOffSwitch &Result) {
|
||||
|
|
Loading…
Reference in New Issue