Skip to content

Conversation

@vitalybuka
Copy link
Collaborator

The SectionStr is already copied in addSection, so
there is no need to copy it again in the Section
constructor.

@llvmbot
Copy link
Member

llvmbot commented Nov 10, 2025

@llvm/pr-subscribers-llvm-support

Author: Vitaly Buka (vitalybuka)

Changes

The SectionStr is already copied in addSection, so
there is no need to copy it again in the Section
constructor.


Full diff: https://github.com/llvm/llvm-project/pull/167278.diff

2 Files Affected:

  • (modified) llvm/include/llvm/Support/SpecialCaseList.h (+1-1)
  • (modified) llvm/lib/Support/SpecialCaseList.cpp (+1-1)
<html>
  <head>
    <meta content="origin" name="referrer">
    <title>Rate limit &middot; GitHub</title>
    <meta name="viewport" content="width=device-width">
    <style type="text/css" media="screen">
      body {
        background-color: #f6f8fa;
        color: rgba(0, 0, 0, 0.5);
        font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;
        font-size: 14px;
        line-height: 1.5;
      }
      .c { margin: 50px auto; max-width: 600px; text-align: center; padding: 0 24px; }
      a { text-decoration: none; }
      a:hover { text-decoration: underline; }
      h1 { color: #24292e; line-height: 60px; font-size: 48px; font-weight: 300; margin: 0px; }
      p { margin: 20px 0 40px; }
      #s { margin-top: 35px; }
      #s a {
        color: #666666;
        font-weight: 200;
        font-size: 14px;
        margin: 0 10px;
      }
    </style>
  </head>
  <body>
    <div class="c">
      <h1>Access has been restricted</h1>
      <p>You have triggered a rate limit.<br><br>
         Please wait a few minutes before you try again;<br>
         in some cases this may take up to an hour.
      </p>
      <div id="s">
        <a href="https://support.github.com">Contact Support</a> &mdash;
        <a href="https://githubstatus.com">GitHub Status</a> &mdash;
        <a href="https://twitter.com/githubstatus">@githubstatus</a>
      </div>
    </div>
  </body>
</html>


vitalybuka added a commit to vitalybuka/llvm-project that referenced this pull request Nov 10, 2025
The SectionStr is already copied in addSection, so
there is no need to copy it again in the Section
constructor.

Pull Request: llvm#167278
arsenm and others added 2 commits November 10, 2025 15:07
Created using spr 1.3.7

[skip ci]
Created using spr 1.3.7
@vitalybuka vitalybuka changed the base branch from users/vitalybuka/spr/main.nfcspecialcaselist-store-sectionstr-as-stringref to main November 10, 2025 23:09
@vitalybuka vitalybuka requested a review from Copilot November 10, 2025 23:09
@vitalybuka vitalybuka enabled auto-merge (squash) November 10, 2025 23:09
Copilot finished reviewing on behalf of vitalybuka November 10, 2025 23:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the SpecialCaseList::Section class to store SectionStr as a StringRef instead of std::string. The change eliminates redundant copying since the string is already copied into the StrAlloc BumpPtrAllocator before the Section is constructed.

  • Moved the SectionStr.copy(StrAlloc) call to execute before Sections.emplace_back() instead of after
  • Changed Section::SectionStr member type from std::string to StringRef

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
llvm/lib/Support/SpecialCaseList.cpp Reordered the copy operation to occur before Section construction
llvm/include/llvm/Support/SpecialCaseList.h Changed Section::SectionStr from std::string to StringRef

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Created using spr 1.3.7
@vitalybuka vitalybuka merged commit 2677c29 into main Nov 11, 2025
10 checks passed
@vitalybuka vitalybuka deleted the users/vitalybuka/spr/nfcspecialcaselist-store-sectionstr-as-stringref branch November 11, 2025 01:36
@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 11, 2025

LLVM Buildbot has detected a new failure on builder clang-aarch64-quick running on linaro-clang-aarch64-quick while building llvm at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/25299

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'LLVM-Unit :: Support/./SupportTests/164/418' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/unittests/Support/./SupportTests-LLVM-Unit-406017-164-418.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=418 GTEST_SHARD_INDEX=164 /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/unittests/Support/./SupportTests
--

Script:
--
/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/unittests/Support/./SupportTests --gtest_filter=ProgramEnvTest.TestLockFileExclusive
--
Note: Google Test filter = ProgramEnvTest.TestLockFileExclusive
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from ProgramEnvTest
../llvm/llvm/unittests/Support/ProgramTest.cpp:594: Failure
Value of: fs::tryLockFile(FD2, std::chrono::seconds(0), fs::LockKind::Shared)
  Actual: true
Expected: false

../llvm/llvm/unittests/Support/ProgramTest.cpp:651: Failure
Value of: Error.empty()
  Actual: false
Expected: true


../llvm/llvm/unittests/Support/ProgramTest.cpp:651
Value of: Error.empty()
  Actual: false
Expected: true



********************


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants