summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCDwarf.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-07-14 05:43:07 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-07-14 05:43:07 +0000
commitc7ac690ba2e4b10d9beb775a5cb859490a859dd1 (patch)
treeca198a8454d13028a45192d03bd8cf4d96e8746f /llvm/lib/MC/MCDwarf.cpp
parenta153ca5885f2bfb4f15dc31b71daf8e3f5491bc2 (diff)
downloadbcm5719-llvm-c7ac690ba2e4b10d9beb775a5cb859490a859dd1.tar.gz
bcm5719-llvm-c7ac690ba2e4b10d9beb775a5cb859490a859dd1.zip
Unfortunately several files in MC are badly violating layering rule by using
TargetAsmInfo, which in turn pulls in TargetRegisterInfo, etc. :-( There are other cases of violations, but this is probably the worst. This patch is but one small step towards fixing this. 500 more steps to go. :-( llvm-svn: 135131
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r--llvm/lib/MC/MCDwarf.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index 4e79cfa3fcf..382f224dffe 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/lib/MC/MCDwarf.cpp
@@ -172,7 +172,9 @@ static inline void EmitDwarfLineTable(MCStreamer *MCOS,
// At this point we want to emit/create the sequence to encode the delta in
// line numbers and the increment of the address from the previous Label
// and the current Label.
- MCOS->EmitDwarfAdvanceLineAddr(LineDelta, LastLabel, Label);
+ const TargetAsmInfo &asmInfo = MCOS->getContext().getTargetAsmInfo();
+ MCOS->EmitDwarfAdvanceLineAddr(LineDelta, LastLabel, Label,
+ asmInfo.getPointerSize());
LastLine = it->getLine();
LastLabel = Label;
@@ -196,7 +198,9 @@ static inline void EmitDwarfLineTable(MCStreamer *MCOS,
// Switch back the the dwarf line section.
MCOS->SwitchSection(context.getTargetAsmInfo().getDwarfLineSection());
- MCOS->EmitDwarfAdvanceLineAddr(INT64_MAX, LastLabel, SectionEnd);
+ const TargetAsmInfo &asmInfo = MCOS->getContext().getTargetAsmInfo();
+ MCOS->EmitDwarfAdvanceLineAddr(INT64_MAX, LastLabel, SectionEnd,
+ asmInfo.getPointerSize());
}
//
OpenPOWER on IntegriCloud