Changes in directory llvm/include/llvm:
InlineAsm.h updated: 1.5 -> 1.6 --- Log message: add methods for constraint parsing --- Diffs of the changes: (+19 -0) InlineAsm.h | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+) Index: llvm/include/llvm/InlineAsm.h diff -u llvm/include/llvm/InlineAsm.h:1.5 llvm/include/llvm/InlineAsm.h:1.6 --- llvm/include/llvm/InlineAsm.h:1.5 Wed Jan 25 16:10:35 2006 +++ llvm/include/llvm/InlineAsm.h Wed Jan 25 20:21:42 2006 @@ -17,6 +17,7 @@ #define LLVM_INLINEASM_H #include "llvm/Value.h" +#include <vector> namespace llvm { @@ -65,6 +66,24 @@ /// static bool Verify(const FunctionType *Ty, const std::string &Constraints); + // Constraint String Parsing + enum ConstraintPrefix { + isInput, // 'x' + isOutput, // '=x' + isIndirectOutput, // '==x' + isClobber, // '~x' + }; + + /// ParseConstraints - Split up the constraint string into the specific + /// constraints and their prefixes. If this returns an empty vector, and if + /// the constraint string itself isn't empty, there was an error parsing. + static std::vector<std::pair<ConstraintPrefix, std::string> > + ParseConstraints(const std::string &ConstraintString); + + std::vector<std::pair<ConstraintPrefix, std::string> > + ParseConstraints() const { + return ParseConstraints(Constraints); + } // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const InlineAsm *) { return true; } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits