[llvm] r327274 - [DebugInfo] Replace unreachable with None
Jonas Devlieghere via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 12 07:45:08 PDT 2018
Author: jdevlieghere
Date: Mon Mar 12 07:45:08 2018
New Revision: 327274
URL: http://llvm.org/viewvc/llvm-project?rev=327274&view=rev
Log:
[DebugInfo] Replace unreachable with None
Invalid user input should not trigger assertions and unreachables. We
already return an Option so we should just return None here.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5532
Modified:
llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp
Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp?rev=327274&r1=327273&r2=327274&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp Mon Mar 12 07:45:08 2018
@@ -161,7 +161,7 @@ DWARFFormValue::getFixedByteSize(dwarf::
return 0;
default:
- llvm_unreachable("Handle this form in this switch statement");
+ break;
}
return None;
}
More information about the llvm-commits
mailing list