Skip to content

[NFC] llvm-cgdata use StringRef in exitWithError to reduce construction #120771

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

AmrDeveloper
Copy link
Member

Replace static void exitWithError(Twine Message, std::string Whence = "", std::string Hint = "") std::string with StringRef to remove constructing Strings on every call or passing by value

Fixes: #100065

Copy link
Collaborator

@DavidSpickett DavidSpickett left a comment

Choose a reason for hiding this comment

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

LGTM

@AmrDeveloper AmrDeveloper merged commit 9cbd705 into llvm:main Jan 20, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

llvm/tools/llvm-cgdata/llvm-cgdata.cpp:69: 2 * clumsy string parameter passing
2 participants