aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGStmt.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-26 07:16:29 +0000
committerChris Lattner <sabre@nondot.org>2009-04-26 07:16:29 +0000
commit44def070435a2b5d67f0534f7a3a85a7389d60f2 (patch)
treead98260329c0c7d84376df4dfb481471b98935de /lib/CodeGen/CGStmt.cpp
parente60ee1d46aac435154682f4ebba724f24d4b0184 (diff)
change TargetInfo::ConstraintInfo to be a struct that contains
the enum along with some other data. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70114 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGStmt.cpp')
-rw-r--r--lib/CodeGen/CGStmt.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp
index 9fd701419b..6fc4a08dd5 100644
--- a/lib/CodeGen/CGStmt.cpp
+++ b/lib/CodeGen/CGStmt.cpp
@@ -731,8 +731,7 @@ llvm::Value* CodeGenFunction::EmitAsmInput(const AsmStmt &S,
const Expr *InputExpr,
std::string &ConstraintStr) {
llvm::Value *Arg;
- if ((Info & TargetInfo::CI_AllowsRegister) ||
- !(Info & TargetInfo::CI_AllowsMemory)) {
+ if (Info.allowsRegister() || !Info.allowsMemory()) {
const llvm::Type *Ty = ConvertType(InputExpr->getType());
if (Ty->isSingleValueType()) {
@@ -818,8 +817,7 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) {
// If the first output operand is not a memory dest, we'll
// make it the return value.
- if (i == 0 && !(Info & TargetInfo::CI_AllowsMemory) &&
- DestValueType->isSingleValueType()) {
+ if (i == 0 && !Info.allowsMemory() && DestValueType->isSingleValueType()) {
ResultAddr = Dest.getAddress();
ResultType = DestValueType;
Constraints += "=" + OutputConstraint;
@@ -832,13 +830,13 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) {
Constraints += OutputConstraint;
}
- if (Info & TargetInfo::CI_ReadWrite) {
+ if (Info.isReadWrite()) {
InOutConstraints += ',';
const Expr *InputExpr = S.getOutputExpr(i);
llvm::Value *Arg = EmitAsmInput(S, Info, InputExpr, InOutConstraints);
- if (Info & TargetInfo::CI_AllowsRegister)
+ if (Info.allowsRegister())
InOutConstraints += llvm::utostr(i);
else
InOutConstraints += OutputConstraint;