llvm.org GIT mirror llvm / 2f95648
Run clang-format on the parts of AsmPrinterDwarf where it improves the readability. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225726 91177308-0d34-0410-b5e6-96231b3b80d8 Adrian Prantl 5 years ago
1 changed file(s) with 11 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
3434 /// DwarfExpression implementation for .debug_loc entries.
3535 class DebugLocDwarfExpression : public DwarfExpression {
3636 ByteStreamer &BS;
37
3738 public:
3839 DebugLocDwarfExpression(TargetMachine &TM, ByteStreamer &BS)
39 : DwarfExpression(TM), BS(BS) {}
40
41 void EmitOp(uint8_t Op, const char* Comment) override;
40 : DwarfExpression(TM), BS(BS) {}
41
42 void EmitOp(uint8_t Op, const char *Comment) override;
4243 void EmitSigned(int Value) override;
4344 void EmitUnsigned(unsigned Value) override;
44 unsigned getFrameRegister() override {
45 llvm_unreachable("not available");
46 };
45 unsigned getFrameRegister() override { llvm_unreachable("not available"); };
4746 };
4847
49 void DebugLocDwarfExpression::EmitOp(uint8_t Op, const char* Comment) {
50 BS.EmitInt8(Op, Comment
51 ? Twine(Comment)+" "+dwarf::OperationEncodingString(Op)
52 : dwarf::OperationEncodingString(Op));
48 void DebugLocDwarfExpression::EmitOp(uint8_t Op, const char *Comment) {
49 BS.EmitInt8(
50 Op, Comment ? Twine(Comment) + " " + dwarf::OperationEncodingString(Op)
51 : dwarf::OperationEncodingString(Op));
5352 }
5453 void DebugLocDwarfExpression::EmitSigned(int Value) {
5554 BS.EmitSLEB128(Value, Twine(Value));
5756 void DebugLocDwarfExpression::EmitUnsigned(unsigned Value) {
5857 BS.EmitULEB128(Value, Twine(Value));
5958 }
60
6159
6260 //===----------------------------------------------------------------------===//
6361 // Dwarf Emission Helper Routines
248246 // caller might be in the middle of a dwarf expression. We should
249247 // probably assert that Reg >= 0 once debug info generation is more
250248 // mature.
251 return Expr.EmitOp(dwarf::DW_OP_nop,
252 "nop (could not find a dwarf register number)");
249 return Expr.EmitOp(dwarf::DW_OP_nop,
250 "nop (could not find a dwarf register number)");
253251
254252 // Attempt to find a valid super- or sub-register.
255253 return Expr.AddMachineRegPiece(MLoc.getReg());