diff options
author | Devang Patel <dpatel@apple.com> | 2011-04-12 23:10:47 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-04-12 23:10:47 +0000 |
commit | 28dce70364a693e4b69dcbcb123656602d82ba27 (patch) | |
tree | ce129e238428221a8d45c7644f7056c961830a26 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 13d47f0ddcc74716ae6c95d95162708763506b4b (diff) | |
download | bcm5719-llvm-28dce70364a693e4b69dcbcb123656602d82ba27.tar.gz bcm5719-llvm-28dce70364a693e4b69dcbcb123656602d82ba27.zip |
Simplify. There is no need to use static variable.
llvm-svn: 129406
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 67bde9cd320..403f78cdfc2 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2206,17 +2206,15 @@ DwarfDebug::computeSizeAndOffset(DIE *Die, unsigned Offset, bool Last) { /// computeSizeAndOffsets - Compute the size and offset of all the DIEs. /// void DwarfDebug::computeSizeAndOffsets() { - unsigned PrevOffset = 0; for (DenseMap<const MDNode *, CompileUnit *>::iterator I = CUMap.begin(), E = CUMap.end(); I != E; ++I) { // Compute size of compile unit header. - static unsigned Offset = PrevOffset + + unsigned Offset = sizeof(int32_t) + // Length of Compilation Unit Info sizeof(int16_t) + // DWARF version number sizeof(int32_t) + // Offset Into Abbrev. Section sizeof(int8_t); // Pointer Size (in bytes) computeSizeAndOffset(I->second->getCUDie(), Offset, true); - PrevOffset = Offset; } } |