mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
AsmParser: Store MacroLikeBodies on the side so they don't get leaked.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187702 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8a7f9de9d4
commit
a2b0c335d8
@ -149,6 +149,9 @@ private:
|
||||
/// ActiveMacros - Stack of active macro instantiations.
|
||||
std::vector<MacroInstantiation*> ActiveMacros;
|
||||
|
||||
/// MacroLikeBodies - List of bodies of anonymous macros.
|
||||
std::deque<MCAsmMacro> MacroLikeBodies;
|
||||
|
||||
/// Boolean tracking whether macro substitution is enabled.
|
||||
unsigned MacrosEnabledFlag : 1;
|
||||
|
||||
@ -3858,7 +3861,8 @@ MCAsmMacro *AsmParser::ParseMacroLikeBody(SMLoc DirectiveLoc) {
|
||||
// We Are Anonymous.
|
||||
StringRef Name;
|
||||
MCAsmMacroParameters Parameters;
|
||||
return new MCAsmMacro(Name, Body, Parameters);
|
||||
MacroLikeBodies.push_back(MCAsmMacro(Name, Body, Parameters));
|
||||
return &MacroLikeBodies.back();
|
||||
}
|
||||
|
||||
void AsmParser::InstantiateMacroLikeBody(MCAsmMacro *M, SMLoc DirectiveLoc,
|
||||
|
Loading…
Reference in New Issue
Block a user