Remove unused code from CoreCLR utilcode#123525
Merged
AaronRobinsonMSFT merged 2 commits intomainfrom Jan 23, 2026
Merged
Conversation
…et from CoreCLR utilcode Co-authored-by: adityamandaleeka <219224+adityamandaleeka@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove unused ClrVirtualAllocAligned and ConfigString class
Remove unused code from CoreCLR utilcode
Jan 23, 2026
adityamandaleeka
approved these changes
Jan 23, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Removes dead/unused CoreCLR utilcode helpers that have no callers, reducing maintenance surface area.
Changes:
- Removed
ClrVirtualAllocAligneddeclaration/definition (and its associated comment block). - Removed unused
ConfigStringandConfigMethodSetwrappers fromutilcode.hand their implementations fromutil.cpp. - Preserved
ConfigDWORD(still used elsewhere).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/coreclr/utilcode/util.cpp | Deletes unused implementations (ClrVirtualAllocAligned, ConfigMethodSet, ConfigString). |
| src/coreclr/inc/utilcode.h | Deletes unused declarations for ClrVirtualAllocAligned, ConfigString, and ConfigMethodSet. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Removes dead code from CoreCLR utilcode that has no callers in the codebase.
Changes
ClrVirtualAllocAligned- Removed function for aligned memory allocation (declaration inutilcode.h, implementation inutil.cppincluding UNIXTODO comment)ConfigString- Removed configuration string wrapper class (never instantiated)ConfigMethodSet- Removed configuration method set class withinit()and twocontains()overloads (never used)ConfigDWORDis preserved - it's actively used throughout the runtime.Verification
Grep confirms removed items exist only in their declaration/implementation sites. Build passes in Debug and Release configurations.
Original prompt
This pull request was created from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.