[llvm-commits] [llvm] r141244 - /llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h

Bill Wendling isanbard at gmail.com
Wed Oct 5 16:26:11 PDT 2011


Author: void
Date: Wed Oct  5 18:26:10 2011
New Revision: 141244

URL: http://llvm.org/viewvc/llvm-project?rev=141244&view=rev
Log:
Add accessor method to check if the landing pad symbol has call site information.

Modified:
    llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h

Modified: llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h?rev=141244&r1=141243&r2=141244&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h Wed Oct  5 18:26:10 2011
@@ -338,9 +338,17 @@
   /// getCallSiteLandingPad - Get the call site indexes for a landing pad EH
   /// symbol.
   SmallVectorImpl<unsigned> &getCallSiteLandingPad(MCSymbol *Sym) {
+    assert(hasCallSiteLandingPad(Sym) &&
+           "missing call site number for landing pad!");
     return LPadToCallSiteMap[Sym];
   }
 
+  /// hasCallSiteLandingPad - Return true if the landing pad Eh symbol has an
+  /// associated call site.
+  bool hasCallSiteLandingPad(MCSymbol *Sym) {
+    return !LPadToCallSiteMap[Sym].empty();
+  }
+
   /// setCallSiteBeginLabel - Map the begin label for a call site.
   void setCallSiteBeginLabel(MCSymbol *BeginLabel, unsigned Site) {
     CallSiteMap[BeginLabel] = Site;





More information about the llvm-commits mailing list