Skip to content

Fix -Wconversion in Dialect.td - #147

Merged
Flakebi merged 3 commits into
devfrom
qiaojbao/test-1
Oct 20, 2026
Merged

Flakebi merged 3 commits into
devfrom
qiaojbao/test-1

Conversation

@qiaojbao

Copy link
Copy Markdown
Contributor

In file included from /home/vk/workspace/github-amd/llpc/lgcDialect/lib/LgcDialect.cpp:14: /home/vk/workspace/github-amd/builds/amdvlk64/compiler/llvm/tools/lgcDialect/include/lib/LgcDialect.cpp.inc: In member function ‘uint32_t lgc::GenericLocationOp::getLocation() const’: /home/vk/workspace/github-amd/builds/amdvlk64/compiler/llvm/tools/lgcDialect/include/lib/LgcDialect.cpp.inc:877:104: error: conversion from ‘uint64_t’ {aka ‘long unsigned int’} to ‘uint32_t’ {aka ‘unsigned int’} may change value [-Werror=conversion]
877 | return ::llvm::cast<::llvm::ConstantInt>(getArgOperand(ArgumentIndex::Location))->getZExtValue() ;

In file included from /home/vk/workspace/github-amd/llpc/lgcDialect/lib/LgcDialect.cpp:14:
/home/vk/workspace/github-amd/builds/amdvlk64/compiler/llvm/tools/lgcDialect/include/lib/LgcDialect.cpp.inc: In member function ‘uint32_t lgc::GenericLocationOp::getLocation() const’:
/home/vk/workspace/github-amd/builds/amdvlk64/compiler/llvm/tools/lgcDialect/include/lib/LgcDialect.cpp.inc:877:104: error: conversion from ‘uint64_t’ {aka ‘long unsigned int’} to ‘uint32_t’ {aka ‘unsigned int’} may change value [-Werror=conversion]
  877 |         return  ::llvm::cast<::llvm::ConstantInt>(getArgOperand(ArgumentIndex::Location))->getZExtValue() ;
@qiaojbao
qiaojbao requested a review from trenouf October 20, 2026 09:20
@Flakebi
Flakebi merged commit 40119ff into dev Oct 20, 2026
13 checks passed
@Flakebi
Flakebi deleted the qiaojbao/test-1 branch October 20, 2026 10:04
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.

2 participants