diff options
| author | Douglas Gregor <dgregor@apple.com> | 2009-04-17 20:57:14 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2009-04-17 20:57:14 +0000 |
| commit | f994f062fd60b186e8fbb750ba5b832b9733f392 (patch) | |
| tree | 9e2b596888c3f9261271a87f2846cf8dcbf1a9d5 /clang/lib/AST | |
| parent | b0b10f8bf6bf9e8732188f38df1925c5d2d8219e (diff) | |
| download | bcm5719-llvm-f994f062fd60b186e8fbb750ba5b832b9733f392.tar.gz bcm5719-llvm-f994f062fd60b186e8fbb750ba5b832b9733f392.zip | |
PCH support for inline assembly statements.
This completes support for all of C (+ extensions). We can (again)
build a PCH file for Carbon.h.
llvm-svn: 69385
Diffstat (limited to 'clang/lib/AST')
| -rw-r--r-- | clang/lib/AST/Stmt.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp index 8e2cf861f83..67910c8ab62 100644 --- a/clang/lib/AST/Stmt.cpp +++ b/clang/lib/AST/Stmt.cpp @@ -175,6 +175,22 @@ std::string AsmStmt::getInputConstraint(unsigned i) const { } +void AsmStmt::setOutputsAndInputs(unsigned NumOutputs, + unsigned NumInputs, + const std::string *Names, + StringLiteral **Constraints, + Stmt **Exprs) { + this->NumOutputs = NumOutputs; + this->NumInputs = NumInputs; + this->Names.clear(); + this->Names.insert(this->Names.end(), Names, Names + NumOutputs + NumInputs); + this->Constraints.clear(); + this->Constraints.insert(this->Constraints.end(), + Constraints, Constraints + NumOutputs + NumInputs); + this->Exprs.clear(); + this->Exprs.insert(this->Exprs.end(), Exprs, Exprs + NumOutputs + NumInputs); +} + /// getNamedOperand - Given a symbolic operand reference like %[foo], /// translate this into a numeric value needed to reference the same operand. /// This returns -1 if the operand name is invalid. @@ -195,6 +211,10 @@ int AsmStmt::getNamedOperand(const std::string &SymbolicName) const { return -1; } +void AsmStmt::setClobbers(StringLiteral **Clobbers, unsigned NumClobbers) { + this->Clobbers.clear(); + this->Clobbers.insert(this->Clobbers.end(), Clobbers, Clobbers + NumClobbers); +} /// AnalyzeAsmString - Analyze the asm string of the current asm, decomposing /// it into pieces. If the asm string is erroneous, emit errors and return |

