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

Bill Wendling isanbard at gmail.com
Tue Oct 4 13:31:56 PDT 2011


Author: void
Date: Tue Oct  4 15:31:56 2011
New Revision: 141107

URL: http://llvm.org/viewvc/llvm-project?rev=141107&view=rev
Log:
Add method to determine if a begin label has a call site number associated with it.

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=141107&r1=141106&r2=141107&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h Tue Oct  4 15:31:56 2011
@@ -329,18 +329,24 @@
     return LandingPads;
   }
 
-  /// setCallSiteBeginLabel - Map the begin label for a call site
+  /// setCallSiteBeginLabel - Map the begin label for a call site.
   void setCallSiteBeginLabel(MCSymbol *BeginLabel, unsigned Site) {
     CallSiteMap[BeginLabel] = Site;
   }
 
-  /// getCallSiteBeginLabel - Get the call site number for a begin label
+  /// getCallSiteBeginLabel - Get the call site number for a begin label.
   unsigned getCallSiteBeginLabel(MCSymbol *BeginLabel) {
-    assert(CallSiteMap.count(BeginLabel) &&
+    assert(hasCallSiteBeginLabel(BeginLabel) &&
            "Missing call site number for EH_LABEL!");
     return CallSiteMap[BeginLabel];
   }
 
+  /// hasCallSiteBeginLabel - Return true if the begin label has a call site
+  /// number associated with it.
+  bool hasCallSiteBeginLabel(MCSymbol *BeginLabel) {
+    return CallSiteMap[BeginLabel] != 0;
+  }
+
   /// setCurrentCallSite - Set the call site currently being processed.
   void setCurrentCallSite(unsigned Site) { CurCallSite = Site; }
 





More information about the llvm-commits mailing list