aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/TargetInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Basic/TargetInfo.h')
-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 99f5bd8628..a00cc0d07c 100644
--- a/include/clang/Basic/TargetInfo.h
+++ b/include/clang/Basic/TargetInfo.h
@@ -356,6 +356,9 @@ public:
unsigned NumOutputs, unsigned &Index) const;
virtual std::string convertConstraint(const char Constraint) const {
+ // 'p' defaults to 'r', but can be overridden by targets.
+ if (Constraint == 'p')
+ return std::string("r");
return std::string(1, Constraint);
}