[llvm-branch-commits] [llvm-branch] r107647 - /llvm/branches/wendling/eh/include/llvm/CodeGen/MachineFunction.h
Bill Wendling
isanbard at gmail.com
Tue Jul 6 03:55:49 PDT 2010
Author: void
Date: Tue Jul 6 05:55:48 2010
New Revision: 107647
URL: http://llvm.org/viewvc/llvm-project?rev=107647&view=rev
Log:
Add the exception handling filter IDs to the machine function. It would be nice
to keep this class clean of information like this. But I can't think of a good
place to put it at the moment.
Modified:
llvm/branches/wendling/eh/include/llvm/CodeGen/MachineFunction.h
Modified: llvm/branches/wendling/eh/include/llvm/CodeGen/MachineFunction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/wendling/eh/include/llvm/CodeGen/MachineFunction.h?rev=107647&r1=107646&r2=107647&view=diff
==============================================================================
--- llvm/branches/wendling/eh/include/llvm/CodeGen/MachineFunction.h (original)
+++ llvm/branches/wendling/eh/include/llvm/CodeGen/MachineFunction.h Tue Jul 6 05:55:48 2010
@@ -91,6 +91,10 @@
// Keep track of jump tables for switch instructions
MachineJumpTableInfo *JumpTableInfo;
+ // Keep track of any exception handling filter IDs.
+ // EH-FIXME: This is pretty gross. Can we put this information somewhere else?
+ std::vector<const Value*> EHFilters;
+
// Function-level unique numbering for MachineBasicBlocks. When a
// MachineBasicBlock is inserted into a MachineFunction is it automatically
// numbered and this vector keeps track of the mapping from ID's to MBB's.
@@ -239,7 +243,19 @@
/// specific MachineBasicBlock is specified, only that block and those after
/// it are renumbered.
void RenumberBlocks(MachineBasicBlock *MBBFrom = 0);
-
+
+ /// addFilterID - Add the given filter ID to the list of types that the
+ /// function can throw.
+ void addFilterID(const Value *V) {
+ EHFilters.push_back(V);
+ }
+
+ // Accessors for the exception handling filters.
+ typedef std::vector<const Value*>::const_iterator filter_iterator;
+
+ filter_iterator filter_begin() const { return EHFilters.begin(); }
+ filter_iterator filter_end() const { return EHFilters.end(); }
+
/// print - Print out the MachineFunction in a format suitable for debugging
/// to the specified stream.
///
More information about the llvm-branch-commits
mailing list