summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-01-10 10:43:19 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-01-10 10:43:19 +0000
commita2cf25d8f4e3ad9d13346331832554066c25754e (patch)
treeae9e8391d72e08d3340ce997ff02090c4e89323c /include
parent53472c9fc35126a8473db35e8ea8daabadf761b4 (diff)
Sema: The asm constraint '+&m' isn't valid, reject it
Don't permit '+&m' to make it to CodeGen, it's invalid. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225586 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/clang/Basic/TargetInfo.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h
index a2ff7e2541..69a5404468 100644
--- a/include/clang/Basic/TargetInfo.h
+++ b/include/clang/Basic/TargetInfo.h
@@ -531,6 +531,7 @@ public:
CI_ReadWrite = 0x04, // "+r" output constraint (read and write).
CI_HasMatchingInput = 0x08, // This output operand has a matching input.
CI_ImmediateConstant = 0x10, // This operand must be an immediate constant
+ CI_EarlyClobber = 0x20, // "&" output constraint (early clobber).
};
unsigned Flags;
int TiedOperand;
@@ -551,6 +552,7 @@ public:
const std::string &getConstraintStr() const { return ConstraintStr; }
const std::string &getName() const { return Name; }
bool isReadWrite() const { return (Flags & CI_ReadWrite) != 0; }
+ bool earlyClobber() { return (Flags & CI_EarlyClobber) != 0; }
bool allowsRegister() const { return (Flags & CI_AllowsRegister) != 0; }
bool allowsMemory() const { return (Flags & CI_AllowsMemory) != 0; }
@@ -576,6 +578,7 @@ public:
int getImmConstantMax() const { return ImmRange.Max; }
void setIsReadWrite() { Flags |= CI_ReadWrite; }
+ void setEarlyClobber() { Flags |= CI_EarlyClobber; }
void setAllowsMemory() { Flags |= CI_AllowsMemory; }
void setAllowsRegister() { Flags |= CI_AllowsRegister; }
void setHasMatchingInput() { Flags |= CI_HasMatchingInput; }