summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-11 19:58:35 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-11 19:58:35 +0000
commit5ad6ff76dc898d1dab1aaccee5e193dbf9e04acb (patch)
tree6f88bf5eff5a344e921c405c4e105f2be0fd8c16 /llvm/lib/CodeGen/AsmPrinter
parent127ea4b616b1436739225607da5d90c25a8bb0b5 (diff)
downloadbcm5719-llvm-5ad6ff76dc898d1dab1aaccee5e193dbf9e04acb.tar.gz
bcm5719-llvm-5ad6ff76dc898d1dab1aaccee5e193dbf9e04acb.zip
Verifier: Check for incompatible bit piece expressions
Convert an assertion into a `Verifier` check. Bit piece expressions must fit inside the variable, and mustn't be the entire variable. Catching this in the verifier will help us find bugs sooner, and makes `DIVariable::getSizeInBits()` dead code. llvm-svn: 234698
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 76e019bf8e9..2998d1fbf30 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1535,15 +1535,7 @@ void DebugLocEntry::finalize(const AsmPrinter &AP,
Offset += PieceOffset-Offset;
}
Offset += PieceSize;
-
-#ifndef NDEBUG
- DIVariable Var = Piece.getVariable();
- unsigned VarSize = Var.getSizeInBits(TypeIdentifierMap);
- assert(PieceSize+PieceOffset <= VarSize
- && "piece is larger than or outside of variable");
- assert(PieceSize != VarSize
- && "piece covers entire variable");
-#endif
+
emitDebugLocValue(AP, TypeIdentifierMap, Streamer, Piece, PieceOffset);
}
} else {
OpenPOWER on IntegriCloud