summaryrefslogtreecommitdiffstats
path: root/clang/Sema
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2007-11-22 01:36:19 +0000
committerAnders Carlsson <andersca@mac.com>2007-11-22 01:36:19 +0000
commit94ea8aab3405d0152fa85a22b7ec5432a33eeed9 (patch)
tree021e2fbea413615a34128b7075a5744f5f2458ec /clang/Sema
parent091a059c55c99f144c3935f6d20d08a3ff5d10ab (diff)
downloadbcm5719-llvm-94ea8aab3405d0152fa85a22b7ec5432a33eeed9.tar.gz
bcm5719-llvm-94ea8aab3405d0152fa85a22b7ec5432a33eeed9.zip
Store output and input operands as well as clobber information in the AsmStmt. Ted, could you please review the serialization/deserialization code?
llvm-svn: 44266
Diffstat (limited to 'clang/Sema')
-rw-r--r--clang/Sema/Sema.h7
-rw-r--r--clang/Sema/SemaStmt.cpp20
2 files changed, 26 insertions, 1 deletions
diff --git a/clang/Sema/Sema.h b/clang/Sema/Sema.h
index 78cc888f341..f747cefcb23 100644
--- a/clang/Sema/Sema.h
+++ b/clang/Sema/Sema.h
@@ -347,7 +347,14 @@ public:
ExprTy *RetValExp);
virtual StmtResult ActOnAsmStmt(SourceLocation AsmLoc,
+ unsigned NumOutputs,
+ unsigned NumInputs,
+ std::string *Names,
+ ExprTy **Constraints,
+ ExprTy **Exprs,
ExprTy *AsmString,
+ unsigned NumClobbers,
+ ExprTy **Clobbers,
SourceLocation RParenLoc);
virtual StmtResult ActOnObjcAtCatchStmt(SourceLocation AtLoc,
diff --git a/clang/Sema/SemaStmt.cpp b/clang/Sema/SemaStmt.cpp
index ad3d2e4ee66..f7aa6a9e272 100644
--- a/clang/Sema/SemaStmt.cpp
+++ b/clang/Sema/SemaStmt.cpp
@@ -645,11 +645,29 @@ Sema::ActOnReturnStmt(SourceLocation ReturnLoc, ExprTy *rex) {
}
Sema::StmtResult Sema::ActOnAsmStmt(SourceLocation AsmLoc,
+ unsigned NumOutputs,
+ unsigned NumInputs,
+ std::string *Names,
+ ExprTy **Constraints,
+ ExprTy **Exprs,
ExprTy *AsmString,
+ unsigned NumClobbers,
+ ExprTy **Clobbers,
SourceLocation RParenLoc) {
Expr *E = (Expr *)AsmString;
- return new AsmStmt(AsmLoc, cast<StringLiteral>(E), RParenLoc);
+ // FIXME: Make sure that the expressions are valid.
+
+ return new AsmStmt(AsmLoc,
+ NumOutputs,
+ NumInputs,
+ Names,
+ reinterpret_cast<StringLiteral**>(Constraints),
+ reinterpret_cast<Expr**>(Exprs),
+ cast<StringLiteral>(E),
+ NumClobbers,
+ reinterpret_cast<StringLiteral**>(Clobbers),
+ RParenLoc);
}
Action::StmtResult
OpenPOWER on IntegriCloud