Skip to content

Commit

Permalink
Make two texts static in ReplayInlineAdvisor
Browse files Browse the repository at this point in the history
This commit makes two variables static.
That makes two buildbot tests pass with short string annotations.

Short string annotations PR (reverted):
- #79049

Tests fixed with this PR:
``
  LLVM :: Transforms/Inline/cgscc-inline-replay.ll
  LLVM :: Transforms/SampleProfile/inline-replay.ll
```
Buildbot output: https://lab.llvm.org/buildbot/#/builders/5/builds/40364/steps/9/logs/stdio

This PR does not resolve a problem with `Clang :: SemaCXX/builtins.cpp`.

I suspect that there may be use after end of life bug and it's fixed by this change.
  • Loading branch information
Advenam Tacet committed Jan 25, 2024
1 parent 9ddbcee commit ca0fff7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/Analysis/ReplayInlineAdvisor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ ReplayInlineAdvisor::ReplayInlineAdvisor(
// main:3:1.1;
// We use the callsite string after `at callsite` to replay inlining.
line_iterator LineIt(*BufferOrErr.get(), /*SkipBlanks=*/true);
const std::string PositiveRemark = "' inlined into '";
const std::string NegativeRemark = "' will not be inlined into '";
static const std::string PositiveRemark = "' inlined into '";
static const std::string NegativeRemark = "' will not be inlined into '";

for (; !LineIt.is_at_eof(); ++LineIt) {
StringRef Line = *LineIt;
Expand Down

0 comments on commit ca0fff7

Please sign in to comment.