Forward isFunctionEHFrameSymbolPrivate. If it is false, produce the foo.eh

symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130375 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2011-04-28 02:46:42 +00:00
parent c26f5447e3
commit a8cfb87fa2
2 changed files with 11 additions and 0 deletions

View File

@ -62,6 +62,10 @@ public:
return TLOF->getFDEEncoding();
}
bool isFunctionEHFrameSymbolPrivate() const {
return TLOF->isFunctionEHFrameSymbolPrivate();
}
unsigned getDwarfRARegNum(bool isEH) const {
return TRI->getDwarfRegNum(TRI->getRARegister(), isEH);
}

View File

@ -17,6 +17,7 @@
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCObjectWriter.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
@ -713,6 +714,12 @@ MCSymbol *FrameEmitterImpl::EmitFDE(MCStreamer &streamer,
MCSymbol *fdeEnd = context.CreateTempSymbol();
const TargetAsmInfo &asmInfo = context.getTargetAsmInfo();
if (!asmInfo.isFunctionEHFrameSymbolPrivate()) {
Twine EHName = frame.Function->getName() + Twine(".eh");
MCSymbol *EHSym = context.GetOrCreateSymbol(EHName);
streamer.EmitLabel(EHSym);
}
// Length
const MCExpr *Length = MakeStartMinusEndExpr(streamer, *fdeStart, *fdeEnd, 0);
streamer.EmitAbsValue(Length, 4);