mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
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()) { ^ llvm-svn: 364505
This commit is contained in:
parent
c683e48ea9
commit
3e33bef549
@ -202,7 +202,7 @@ static Expected<std::string> readIdentificationBlock(BitstreamCursor &Stream) {
|
||||
Expected<unsigned> MaybeBitCode = Stream.readRecord(Entry.ID, Record);
|
||||
if (!MaybeBitCode)
|
||||
return MaybeBitCode.takeError();
|
||||
switch (unsigned BitCode = MaybeBitCode.get()) {
|
||||
switch (MaybeBitCode.get()) {
|
||||
default: // Default behavior: reject
|
||||
return error("Invalid value");
|
||||
case bitc::IDENTIFICATION_CODE_STRING: // IDENTIFICATION: [strchr x N]
|
||||
@ -5364,7 +5364,7 @@ Error ModuleSummaryIndexBitcodeReader::parseModule() {
|
||||
Expected<unsigned> MaybeBitCode = Stream.readRecord(Entry.ID, Record);
|
||||
if (!MaybeBitCode)
|
||||
return MaybeBitCode.takeError();
|
||||
switch (unsigned BitCode = MaybeBitCode.get()) {
|
||||
switch (MaybeBitCode.get()) {
|
||||
default:
|
||||
break; // Default behavior, ignore unknown content.
|
||||
case bitc::MODULE_CODE_VERSION: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user