Skip to content
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

llvm-wrapper: fix few warnings #121389

Merged
merged 2 commits into from
Feb 26, 2024
Merged

llvm-wrapper: fix few warnings #121389

merged 2 commits into from
Feb 26, 2024

Commits on Feb 21, 2024

  1. llvm-wrapper: fix warning C4244

    klensy committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    205cfcb View commit details
    Browse the repository at this point in the history
  2. llvm-wrapper: fix warning C4305

    llvm-wrapper/ArchiveWrapper.cpp(70): warning C4305: 'argument': truncation from 'int' to 'bool'
    while in llvm 12 signature was
     static ErrorOr<std::unique_ptr<MemoryBuffer>> getFile(const Twine &Filename, int64_t FileSize = -1, bool RequiresNullTerminator = true, bool IsVolatile = false);
    https://github.com/llvm/llvm-project/blame/fed41342a82f5a3a9201819a82bf7a48313e296b/llvm/include/llvm/Support/MemoryBuffer.h#L85-L87
    
    in llvm 13 and later it was changed to
    static ErrorOr<std::unique_ptr<MemoryBuffer>> getFile(const Twine &Filename, bool IsText = false, bool RequiresNullTerminator = true, bool IsVolatile = false);
    https://github.com/llvm/llvm-project/blame/75e33f71c2dae584b13a7d1186ae0a038ba98838/llvm/include/llvm/Support/MemoryBuffer.h#L86-L88
    
    so code was interpreted as MemoryBuffer::getFile(Path, /*IsText*/true, /*RequiresNullTerminator=*/false), but now will be MemoryBuffer::getFile(Path, /*IsText*/false, /*RequiresNullTerminator=*/false). How that worked before?
    klensy committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    0ce966f View commit details
    Browse the repository at this point in the history