diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-01-28 01:45:32 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-01-28 01:45:32 +0000 |
commit | 54c05308348cc0687d9b5a0e1ec60f2e79436b02 (patch) | |
tree | 1daeb286a03c40d23c0ee3441e743ae75b6699d6 /llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp | |
parent | b3a44005549256475f21986fc39e884530e1942c (diff) | |
download | bcm5719-llvm-54c05308348cc0687d9b5a0e1ec60f2e79436b02.tar.gz bcm5719-llvm-54c05308348cc0687d9b5a0e1ec60f2e79436b02.zip |
Update of 94055 to track the IR level call site information via an intrinsic.
This allows code gen and the exception table writer to cooperate to make sure
landing pads are associated with the correct invoke locations.
llvm-svn: 94726
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp index d119b3cbd3c..c762b701767 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp @@ -579,7 +579,16 @@ ComputeCallSiteTable(SmallVectorImpl<CallSiteEntry> &CallSites, } // Otherwise, create a new call-site. - CallSites.push_back(Site); + if (MAI->getExceptionHandlingType() == ExceptionHandling::Dwarf) + CallSites.push_back(Site); + else { + // SjLj EH must maintain the call sites in the order assigned + // to them by the SjLjPrepare pass. + unsigned SiteNo = MMI->getCallSiteBeginLabel(BeginLabel); + if (CallSites.size() < SiteNo) + CallSites.resize(SiteNo); + CallSites[SiteNo - 1] = Site; + } PreviousIsInvoke = true; } else { // Create a gap. |