projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e80617d
)
[DWARFYAML][debug_ranges] Fix inappropriate assertion. NFC.
author
Xing GUO
<higuoxing@gmail.com>
Sun, 7 Jun 2020 14:43:37 +0000
(22:43 +0800)
committer
Xing GUO
<higuoxing@gmail.com>
Sun, 7 Jun 2020 14:45:52 +0000
(22:45 +0800)
llvm/lib/ObjectYAML/DWARFEmitter.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/ObjectYAML/DWARFEmitter.cpp
b/llvm/lib/ObjectYAML/DWARFEmitter.cpp
index
29320f0
..
16bbad1
100644
(file)
--- a/
llvm/lib/ObjectYAML/DWARFEmitter.cpp
+++ b/
llvm/lib/ObjectYAML/DWARFEmitter.cpp
@@
-123,7
+123,9
@@
void DWARFYAML::EmitDebugRanges(raw_ostream &OS, const DWARFYAML::Data &DI) {
const size_t RangesOffset = OS.tell();
for (auto DebugRanges : DI.DebugRanges) {
const size_t CurrOffset = OS.tell() - RangesOffset;
- assert(DebugRanges.Offset <= CurrOffset);
+ assert(DebugRanges.Offset >= CurrOffset &&
+ "Offset should be greater than or equal to the bytes that we have "
+ "written");
if (DebugRanges.Offset > CurrOffset)
ZeroFillBytes(OS, DebugRanges.Offset - CurrOffset);
for (auto Entry : DebugRanges.Entries) {