diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-08-24 22:31:37 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-08-24 22:31:37 +0000 |
commit | eee864520ce4c5abde0f332d46b53d18fb53bdab (patch) | |
tree | 458b61b90e38da587fbdd62571343f048a769d33 /llvm/lib/MC/MCStreamer.cpp | |
parent | dd6be27427ee0fd5e697aa7f93f317b593ab3874 (diff) | |
download | bcm5719-llvm-eee864520ce4c5abde0f332d46b53d18fb53bdab.tar.gz bcm5719-llvm-eee864520ce4c5abde0f332d46b53d18fb53bdab.zip |
Some autoconf tests use module level inline asm to test compiler's handling of
.cfi_startproc. e.g. libffi:
$ cat confopt.c
asm (".cfi_startproc\n\t.cfi_endproc");
int main () { return 0; }
Teach MC / dwarf emission to handle these cfi directives which essentially
create an empty frame.
rdar://10017184
llvm-svn: 138504
Diffstat (limited to 'llvm/lib/MC/MCStreamer.cpp')
-rw-r--r-- | llvm/lib/MC/MCStreamer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp index 5295d0f58f3..7e3d7a6886e 100644 --- a/llvm/lib/MC/MCStreamer.cpp +++ b/llvm/lib/MC/MCStreamer.cpp @@ -190,14 +190,14 @@ void MCStreamer::EmitCFIStartProc() { MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo(); if (CurFrame && !CurFrame->End) report_fatal_error("Starting a frame before finishing the previous one!"); - MCDwarfFrameInfo Frame; + MCDwarfFrameInfo Frame; Frame.Function = LastSymbol; // If the function is externally visible, we need to create a local // symbol to avoid relocations. StringRef Prefix = getContext().getAsmInfo().getPrivateGlobalPrefix(); - if (LastSymbol->getName().startswith(Prefix)) { + if (LastSymbol && LastSymbol->getName().startswith(Prefix)) { Frame.Begin = LastSymbol; } else { Frame.Begin = getContext().CreateTempSymbol(); |