mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
add methods for constraint parsing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25636 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
#define LLVM_INLINEASM_H
|
#define LLVM_INLINEASM_H
|
||||||
|
|
||||||
#include "llvm/Value.h"
|
#include "llvm/Value.h"
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
@@ -65,6 +66,24 @@ public:
|
|||||||
///
|
///
|
||||||
static bool Verify(const FunctionType *Ty, const std::string &Constraints);
|
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:
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const InlineAsm *) { return true; }
|
static inline bool classof(const InlineAsm *) { return true; }
|
||||||
|
Reference in New Issue
Block a user