DwarfException.cpp (200581) | DwarfException.cpp (201360) |
---|---|
1//===-- CodeGen/AsmPrinter/DwarfException.cpp - Dwarf Exception Impl ------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 21 unchanged lines hidden (view full) --- 30#include "llvm/Support/Dwarf.h" 31#include "llvm/Support/Mangler.h" 32#include "llvm/Support/Timer.h" 33#include "llvm/Support/raw_ostream.h" 34#include "llvm/ADT/SmallString.h" 35#include "llvm/ADT/StringExtras.h" 36using namespace llvm; 37 | 1//===-- CodeGen/AsmPrinter/DwarfException.cpp - Dwarf Exception Impl ------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 21 unchanged lines hidden (view full) --- 30#include "llvm/Support/Dwarf.h" 31#include "llvm/Support/Mangler.h" 32#include "llvm/Support/Timer.h" 33#include "llvm/Support/raw_ostream.h" 34#include "llvm/ADT/SmallString.h" 35#include "llvm/ADT/StringExtras.h" 36using namespace llvm; 37 |
38static TimerGroup &getDwarfTimerGroup() { 39 static TimerGroup DwarfTimerGroup("DWARF Exception"); 40 return DwarfTimerGroup; 41} 42 | |
43DwarfException::DwarfException(raw_ostream &OS, AsmPrinter *A, 44 const MCAsmInfo *T) 45 : Dwarf(OS, A, T, "eh"), shouldEmitTable(false), shouldEmitMoves(false), 46 shouldEmitTableModule(false), shouldEmitMovesModule(false), 47 ExceptionTimer(0) { 48 if (TimePassesIsEnabled) | 38DwarfException::DwarfException(raw_ostream &OS, AsmPrinter *A, 39 const MCAsmInfo *T) 40 : Dwarf(OS, A, T, "eh"), shouldEmitTable(false), shouldEmitMoves(false), 41 shouldEmitTableModule(false), shouldEmitMovesModule(false), 42 ExceptionTimer(0) { 43 if (TimePassesIsEnabled) |
49 ExceptionTimer = new Timer("DWARF Exception Writer", 50 getDwarfTimerGroup()); | 44 ExceptionTimer = new Timer("DWARF Exception Writer"); |
51} 52 53DwarfException::~DwarfException() { 54 delete ExceptionTimer; 55} 56 57/// SizeOfEncodedValue - Return the size of the encoding in bytes. 58unsigned DwarfException::SizeOfEncodedValue(unsigned Encoding) { --- 228 unchanged lines hidden (view full) --- 287 // If there is a personality and landing pads then point to the language 288 // specific data area in the exception table. 289 if (MMI->getPersonalities()[0] != NULL) { 290 bool is4Byte = TD->getPointerSize() == sizeof(int32_t); 291 292 Asm->EmitULEB128Bytes(is4Byte ? 4 : 8); 293 Asm->EOL("Augmentation size"); 294 | 45} 46 47DwarfException::~DwarfException() { 48 delete ExceptionTimer; 49} 50 51/// SizeOfEncodedValue - Return the size of the encoding in bytes. 52unsigned DwarfException::SizeOfEncodedValue(unsigned Encoding) { --- 228 unchanged lines hidden (view full) --- 281 // If there is a personality and landing pads then point to the language 282 // specific data area in the exception table. 283 if (MMI->getPersonalities()[0] != NULL) { 284 bool is4Byte = TD->getPointerSize() == sizeof(int32_t); 285 286 Asm->EmitULEB128Bytes(is4Byte ? 4 : 8); 287 Asm->EOL("Augmentation size"); 288 |
295 // We force 32-bits here because we've encoded our LSDA in the CIE with 296 // `dwarf::DW_EH_PE_sdata4'. And the CIE and FDE should agree. | |
297 if (EHFrameInfo.hasLandingPads) | 289 if (EHFrameInfo.hasLandingPads) |
298 EmitReference("exception", EHFrameInfo.Number, true, true); 299 else 300 Asm->EmitInt32((int)0); 301 | 290 EmitReference("exception", EHFrameInfo.Number, true, false); 291 else { 292 if (is4Byte) 293 Asm->EmitInt32((int)0); 294 else 295 Asm->EmitInt64((int)0); 296 } |
302 Asm->EOL("Language Specific Data Area"); 303 } else { 304 Asm->EmitULEB128Bytes(0); 305 Asm->EOL("Augmentation size"); 306 } 307 308 // Indicate locations of function specific callee saved registers in frame. 309 EmitFrameMoves("eh_func_begin", EHFrameInfo.Number, EHFrameInfo.Moves, --- 724 unchanged lines hidden --- | 297 Asm->EOL("Language Specific Data Area"); 298 } else { 299 Asm->EmitULEB128Bytes(0); 300 Asm->EOL("Augmentation size"); 301 } 302 303 // Indicate locations of function specific callee saved registers in frame. 304 EmitFrameMoves("eh_func_begin", EHFrameInfo.Number, EHFrameInfo.Moves, --- 724 unchanged lines hidden --- |