aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGStmt.cpp
diff options
context:
space:
mode:
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;