diff options
author | Daniil Fukalov <1671137+dfukalov@users.noreply.github.com> | 2024-05-28 16:09:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-28 16:09:53 +0200 |
commit | 3864bfd2e0ce7e32fd623c550660885599383e6a (patch) | |
tree | 0ff1fc31e58e4383eecf013d1e338026b0f2858a /llvm/lib/IR/Function.cpp | |
parent | 46a30dfdfd765021a76c927f70f95024d30786f2 (diff) | |
download | llvm-3864bfd2e0ce7e32fd623c550660885599383e6a.zip llvm-3864bfd2e0ce7e32fd623c550660885599383e6a.tar.gz llvm-3864bfd2e0ce7e32fd623c550660885599383e6a.tar.bz2 |
[IR] Fix ignoring `non-global-value-max-name-size` in `ValueSymbolTable::makeUniqueName()`. (#89057)
E.g. during inlining new symbol name can be duplicated and then
`ValueSymbolTable::makeUniqueName()` will add unique suffix, exceeding
the `non-global-value-max-name-size` restriction.
Also fixed `unsigned` type of the option to `int` since `ValueSymbolTable`'
constructor can use `-1` value that means unrestricted name size.
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r-- | llvm/lib/IR/Function.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp index bd06ff8..13fa1af 100644 --- a/llvm/lib/IR/Function.cpp +++ b/llvm/lib/IR/Function.cpp @@ -79,7 +79,7 @@ using ProfileCount = Function::ProfileCount; // are not in the public header file... template class llvm::SymbolTableListTraits<BasicBlock>; -static cl::opt<unsigned> NonGlobalValueMaxNameSize( +static cl::opt<int> NonGlobalValueMaxNameSize( "non-global-value-max-name-size", cl::Hidden, cl::init(1024), cl::desc("Maximum size for the name of non-global values.")); |