diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-12-03 00:55:40 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-12-03 00:55:40 +0000 |
commit | 32a006e606742b1c5401e49607e33717bb5441f0 (patch) | |
tree | a0f3328f54b7df420f636fcd4ece07f4accd2f6c /lib/MC/MCStreamer.cpp | |
parent | 0bdf0c05b990b4f2d29719b34f4ce44f16176f09 (diff) |
Try to resolve symbol differences early, and if successful create a plain
data fragment. This reduces the time to assemble the test in 8711 from 60s to
54s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120767 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCStreamer.cpp')
-rw-r--r-- | lib/MC/MCStreamer.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/MC/MCStreamer.cpp b/lib/MC/MCStreamer.cpp index 7921957f54..9fe719a7fa 100644 --- a/lib/MC/MCStreamer.cpp +++ b/lib/MC/MCStreamer.cpp @@ -30,6 +30,17 @@ raw_ostream &MCStreamer::GetCommentOS() { return nulls(); } +void MCStreamer::EmitDwarfSetLineAddr(int64_t LineDelta, + const MCSymbol *Label, int PointerSize) { + // emit the sequence to set the address + EmitIntValue(dwarf::DW_LNS_extended_op, 1); + EmitULEB128IntValue(PointerSize + 1); + EmitIntValue(dwarf::DW_LNE_set_address, 1); + EmitSymbolValue(Label, PointerSize); + + // emit the sequence for the LineDelta (from 1) and a zero address delta. + MCDwarfLineAddr::Emit(this, LineDelta, 0); +} /// EmitIntValue - Special case of EmitValue that avoids the client having to /// pass in a MCExpr for constant integers. |