llvm-project
bc9f4edf - [LTO] Fix used before intialised warning (#143705)

Commit
89 days ago
[LTO] Fix used before intialised warning (#143705) For whatever reason I can't reproduce this locally but I can on Compiler Explorer (https://godbolt.org/z/nfv4b83q6) and on our flang gcc bot (https://lab.llvm.org/buildbot/#/builders/130/builds/13683/steps/5/logs/stdio). In file included from ../llvm-project/llvm/include/llvm/LTO/LTO.h:33, from ../llvm-project/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:29: ../llvm-project/llvm/include/llvm/Transforms/IPO/FunctionImport.h: In constructor ‘llvm::FunctionImporter::ImportListsTy::ImportListsTy()’: ../llvm-project/llvm/include/llvm/Transforms/IPO/FunctionImport.h:275:33: warning: member ‘llvm::FunctionImporter::ImportListsTy::ImportIDs’ is used uninitialized [-Wuninitialized] 275 | ImportListsTy() : EmptyList(ImportIDs) {} | ^~~~~~~~~ ../llvm-project/llvm/include/llvm/Transforms/IPO/FunctionImport.h: In constructor ‘llvm::FunctionImporter::ImportListsTy::ImportListsTy(size_t)’: ../llvm-project/llvm/include/llvm/Transforms/IPO/FunctionImport.h:276:44: warning: member ‘llvm::FunctionImporter::ImportListsTy::ImportIDs’ is used uninitialized [-Wuninitialized] 276 | ImportListsTy(size_t Size) : EmptyList(ImportIDs), ListsImpl(Size) {} | ^~~~~~~~~ ImportIDs was being used during construction of EmptyList, before ImportIDs itself had been constructed.
Author
Parents
Loading