llvm.org GIT mirror llvm / 7119563
Fix -Wunused-variable warnings after r364464 /work/llvm.monorepo/llvm/lib/Bitcode/Reader/BitcodeReader.cpp: In function ‘llvm::Expected<std::basic_string<char> > readIdentificationBlock(llvm::BitstreamCursor&)’: /work/llvm.monorepo/llvm/lib/Bitcode/Reader/BitcodeReader.cpp:205:22: warning: unused variable ‘BitCode’ [-Wunused-variable] switch (unsigned BitCode = MaybeBitCode.get()) { ^ /work/llvm.monorepo/llvm/lib/Bitcode/Reader/BitcodeReader.cpp: In member function ‘llvm::Error {anonymous}::ModuleSummaryIndexBitcodeReader::parseModule()’: /work/llvm.monorepo/llvm/lib/Bitcode/Reader/BitcodeReader.cpp:5367:26: warning: unused variable ‘BitCode’ [-Wunused-variable] switch (unsigned BitCode = MaybeBitCode.get()) { ^ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364505 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg a month ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
201201 Expected MaybeBitCode = Stream.readRecord(Entry.ID, Record);
202202 if (!MaybeBitCode)
203203 return MaybeBitCode.takeError();
204 switch (unsigned BitCode = MaybeBitCode.get()) {
204 switch (MaybeBitCode.get()) {
205205 default: // Default behavior: reject
206206 return error("Invalid value");
207207 case bitc::IDENTIFICATION_CODE_STRING: // IDENTIFICATION: [strchr x N]
53635363 Expected MaybeBitCode = Stream.readRecord(Entry.ID, Record);
53645364 if (!MaybeBitCode)
53655365 return MaybeBitCode.takeError();
5366 switch (unsigned BitCode = MaybeBitCode.get()) {
5366 switch (MaybeBitCode.get()) {
53675367 default:
53685368 break; // Default behavior, ignore unknown content.
53695369 case bitc::MODULE_CODE_VERSION: {