Skip to content

Commit abef659

Browse files
committed
[ms] [llvm-ml] Implement the statement expansion operator
If prefaced with a %, expand text macros and macro functions in any statement. Also, prevent expanding text macros in the message of an ECHO directive unless expanded explicitly by the statement expansion operator. Reviewed By: thakis Differential Revision: https://reviews.llvm.org/D89740
1 parent 40dc535 commit abef659

File tree

3 files changed

+235
-58
lines changed

3 files changed

+235
-58
lines changed

llvm/include/llvm/MC/MCAsmMacro.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,15 @@ struct MCAsmMacro {
144144
StringRef Body;
145145
MCAsmMacroParameters Parameters;
146146
std::vector<std::string> Locals;
147+
bool IsFunction = false;
147148

148149
public:
149150
MCAsmMacro(StringRef N, StringRef B, MCAsmMacroParameters P)
150151
: Name(N), Body(B), Parameters(std::move(P)) {}
151152
MCAsmMacro(StringRef N, StringRef B, MCAsmMacroParameters P,
152-
std::vector<std::string> L)
153-
: Name(N), Body(B), Parameters(std::move(P)), Locals(std::move(L)) {}
153+
std::vector<std::string> L, bool F)
154+
: Name(N), Body(B), Parameters(std::move(P)), Locals(std::move(L)),
155+
IsFunction(F) {}
154156

155157
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
156158
void dump() const { dump(dbgs()); }

0 commit comments

Comments
 (0)