aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/TargetInfo.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-11-12 06:42:51 +0000
committerBill Wendling <isanbard@gmail.com>2012-11-12 06:42:51 +0000
commit68fd608c2c0866064e974c3d43778c47c1cbb080 (patch)
treee2c7183de084260133fe95211e56ba2a548e1c9a /include/clang/Basic/TargetInfo.h
parentc6b82c353bef4cbc0d1dde8580abf8d0a266e64b (diff)
Check that the input size is correct for the given constraint.
The 'a', 'c', and 'd' constraints on i386 mean a 32-bit register. We cannot place a 64-bit value into the 32-bit register. Error out instead of causing the compiler to spew general badness. <rdar://problem/12415959> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167717 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/TargetInfo.h')
-rw-r--r--include/clang/Basic/TargetInfo.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h
index b0e58050d5..6774e8ed2c 100644
--- a/include/clang/Basic/TargetInfo.h
+++ b/include/clang/Basic/TargetInfo.h
@@ -517,6 +517,10 @@ public:
bool validateInputConstraint(ConstraintInfo *OutputConstraints,
unsigned NumOutputs,
ConstraintInfo &info) const;
+ virtual bool validateInputSize(StringRef /*Constraint*/,
+ unsigned /*Size*/) const {
+ return true;
+ }
virtual bool validateConstraintModifier(StringRef /*Constraint*/,
const char /*Modifier*/,
unsigned /*Size*/) const {