File tree Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -650,24 +650,9 @@ bool swift::expandFreestandingDeclarationMacro(
650
650
// Figure out a reasonable name for the macro expansion buffer.
651
651
std::string bufferName;
652
652
{
653
- llvm::raw_string_ostream out (bufferName);
654
-
655
- out << " macro:" << macro->getName ().getBaseName ();
656
- if (auto bufferID = sourceFile->getBufferID ()) {
657
- unsigned startLine, startColumn;
658
- std::tie (startLine, startColumn) =
659
- sourceMgr.getLineAndColumnInBuffer (med->getStartLoc (), *bufferID);
660
-
661
- SourceLoc endLoc =
662
- Lexer::getLocForEndOfToken (sourceMgr, med->getEndLoc ());
663
- unsigned endLine, endColumn;
664
- std::tie (endLine, endColumn) =
665
- sourceMgr.getLineAndColumnInBuffer (endLoc, *bufferID);
666
-
667
- out << " :" << sourceMgr.getIdentifierForBuffer (*bufferID) << " :"
668
- << startLine << " :" << startColumn
669
- << " -" << endLine << " :" << endColumn;
670
- }
653
+ Mangle::ASTMangler mangler;
654
+ bufferName = adjustMacroExpansionBufferName (
655
+ mangler.mangleMacroExpansion (med));
671
656
}
672
657
673
658
// Dump macro expansions to standard output, if requested.
You can’t perform that action at this time.
0 commit comments