summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-05-10 15:20:23 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-05-10 15:20:23 +0000
commit27390b4a0e187a673bf9b90f32164fd953a0c967 (patch)
treee239b3ed15a5167bfdedef9668eb5f5d3495b769 /llvm/lib
parent3c0447259c77a154dcb039634353ef0c2b0bff3a (diff)
downloadbcm5719-llvm-27390b4a0e187a673bf9b90f32164fd953a0c967.tar.gz
bcm5719-llvm-27390b4a0e187a673bf9b90f32164fd953a0c967.zip
In a debug_frame the cfi offset is to the start of the debug_frame section!
llvm-svn: 131129
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/MC/MCDwarf.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index e7e2cbb139f..38f2fc0770c 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/lib/MC/MCDwarf.cpp
@@ -752,9 +752,13 @@ MCSymbol *FrameEmitterImpl::EmitFDE(MCStreamer &streamer,
streamer.EmitLabel(fdeStart);
// CIE Pointer
- const MCExpr *offset = MakeStartMinusEndExpr(streamer, cieStart, *fdeStart,
- 0);
- streamer.EmitAbsValue(offset, 4);
+ if (IsEH) {
+ const MCExpr *offset = MakeStartMinusEndExpr(streamer, cieStart, *fdeStart,
+ 0);
+ streamer.EmitAbsValue(offset, 4);
+ } else {
+ streamer.EmitSymbolValue(&cieStart, 4);
+ }
unsigned fdeEncoding = asmInfo.getFDEEncoding(UsingCFI);
unsigned size = getSizeForEncoding(streamer, fdeEncoding);
OpenPOWER on IntegriCloud