Skip to content

Commit 572bb10

Browse files
committed
Closes #32
1 parent e010c11 commit 572bb10

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llvm/lib/Transforms/IPO/MSVCMacroRebuilding.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ bool MSVCMacroRebuildingPass::replace__FUNCTION__(std::string &RegexStr,
2929

3030
// Get the original string value of the constant data array.
3131
std::string OriginalStr = CDA->getAsCString().str();
32+
33+
// Check the marker name.
34+
if (OriginalStr.find(
35+
MSVCMacroRebuildingPass::get__FUNCTION__MarkerName().str()) ==
36+
std::string::npos)
37+
return false;
38+
3239
// Replace the macro marker and file name in the original string with
3340
// the name of the function containing the instruction.
3441
std::string ReplacedStr = std::regex_replace(

0 commit comments

Comments
 (0)