[llvm] r225848 - cleanup.
Adrian Prantl
aprantl at apple.com
Tue Jan 13 15:11:51 PST 2015
Author: adrian
Date: Tue Jan 13 17:11:51 2015
New Revision: 225848
URL: http://llvm.org/viewvc/llvm-project?rev=225848&view=rev
Log:
cleanup.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=225848&r1=225847&r2=225848&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue Jan 13 17:11:51 2015
@@ -1670,19 +1670,18 @@ void DwarfDebug::emitLocPieces(ByteStrea
unsigned Offset = 0;
for (auto Piece : Values) {
+ const unsigned SizeOfByte = 8;
DIExpression Expr = Piece.getExpression();
unsigned PieceOffset = Expr.getPieceOffset();
unsigned PieceSize = Expr.getPieceSize();
assert(Offset <= PieceOffset && "overlapping or duplicate pieces");
if (Offset < PieceOffset) {
// The DWARF spec seriously mandates pieces with no locations for gaps.
- Asm->EmitDwarfOpPiece(Streamer, (PieceOffset-Offset)*8);
+ Asm->EmitDwarfOpPiece(Streamer, (PieceOffset-Offset)*SizeOfByte);
Offset += PieceOffset-Offset;
}
-
Offset += PieceSize;
- const unsigned SizeOfByte = 8;
#ifndef NDEBUG
DIVariable Var = Piece.getVariable();
assert(!Var.isIndirect() && "indirect address for piece");
More information about the llvm-commits
mailing list