aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCStreamer.cpp
diff options
context:
space:
mode:
authorMarkus Lavin <markus.lavin@ericsson.com>2019-03-19 08:48:19 +0000
committerMarkus Lavin <markus.lavin@ericsson.com>2019-03-19 08:48:19 +0000
commitcd8a940b37b284bf827665c10bcb4351b6d2e1c6 (patch)
treec5b934ca4249bc75add749efbe477c94a5450713 /llvm/lib/MC/MCStreamer.cpp
parentf170dff3c198290eda05272f7d4beb6f93b80168 (diff)
downloadllvm-cd8a940b37b284bf827665c10bcb4351b6d2e1c6.zip
llvm-cd8a940b37b284bf827665c10bcb4351b6d2e1c6.tar.gz
llvm-cd8a940b37b284bf827665c10bcb4351b6d2e1c6.tar.bz2
[DebugInfo] Introduce DW_OP_LLVM_convert
Introduce a DW_OP_LLVM_convert Dwarf expression pseudo op that allows for a convenient way to perform type conversions on the Dwarf expression stack. As an additional bonus it paves the way for using other Dwarf v5 ops that need to reference a base_type. The new DW_OP_LLVM_convert is used from lib/Transforms/Utils/Local.cpp to perform sext/zext on debug values but mainly the patch is about preparing terrain for adding other Dwarf v5 ops that need to reference a base_type. For Dwarf v5 the op maps to DW_OP_convert and for earlier versions a complex shift & mask pattern is generated to emulate sext/zext. Differential Revision: https://reviews.llvm.org/D56587 llvm-svn: 356442
Diffstat (limited to 'llvm/lib/MC/MCStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCStreamer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp
index 554cce1..2d615f2 100644
--- a/llvm/lib/MC/MCStreamer.cpp
+++ b/llvm/lib/MC/MCStreamer.cpp
@@ -135,10 +135,10 @@ void MCStreamer::EmitIntValue(uint64_t Value, unsigned Size) {
/// EmitULEB128IntValue - Special case of EmitULEB128Value that avoids the
/// client having to pass in a MCExpr for constant integers.
-void MCStreamer::EmitULEB128IntValue(uint64_t Value) {
+void MCStreamer::EmitULEB128IntValue(uint64_t Value, unsigned PadTo) {
SmallString<128> Tmp;
raw_svector_ostream OSE(Tmp);
- encodeULEB128(Value, OSE);
+ encodeULEB128(Value, OSE, PadTo);
EmitBytes(OSE.str());
}