From d9fb09a91b77dd96db1b3ab3a1fbe9514810feb7 Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Mon, 27 Aug 2012 23:28:41 +0000 Subject: [PATCH] [ms-inline asm] Rename getClobber to getClobberStringLiteral. No functional change intended. llvm-svn: 162710 --- clang/include/clang/AST/RecursiveASTVisitor.h | 2 +- clang/include/clang/AST/Stmt.h | 6 ++++-- clang/lib/AST/StmtPrinter.cpp | 2 +- clang/lib/AST/StmtProfile.cpp | 2 +- clang/lib/CodeGen/CGStmt.cpp | 2 +- clang/lib/Sema/TreeTransform.h | 2 +- clang/lib/Serialization/ASTWriterStmt.cpp | 2 +- clang/tools/libclang/RecursiveASTVisitor.h | 2 +- 8 files changed, 11 insertions(+), 9 deletions(-) diff --git a/clang/include/clang/AST/RecursiveASTVisitor.h b/clang/include/clang/AST/RecursiveASTVisitor.h index c24b0a9c4365..ae4ff4b1f83c 100644 --- a/clang/include/clang/AST/RecursiveASTVisitor.h +++ b/clang/include/clang/AST/RecursiveASTVisitor.h @@ -1836,7 +1836,7 @@ DEF_TRAVERSE_STMT(GCCAsmStmt, { TRY_TO(TraverseStmt(S->getOutputConstraintLiteral(I))); } for (unsigned I = 0, E = S->getNumClobbers(); I < E; ++I) { - TRY_TO(TraverseStmt(S->getClobber(I))); + TRY_TO(TraverseStmt(S->getClobberStringLiteral(I))); } // children() iterates over inputExpr and outputExpr. }) diff --git a/clang/include/clang/AST/Stmt.h b/clang/include/clang/AST/Stmt.h index 74bd16969a93..dad943d02142 100644 --- a/clang/include/clang/AST/Stmt.h +++ b/clang/include/clang/AST/Stmt.h @@ -1644,8 +1644,10 @@ public: int getNamedOperand(StringRef SymbolicName) const; unsigned getNumClobbers() const { return NumClobbers; } - StringLiteral *getClobber(unsigned i) { return Clobbers[i]; } - const StringLiteral *getClobber(unsigned i) const { return Clobbers[i]; } + StringLiteral *getClobberStringLiteral(unsigned i) { return Clobbers[i]; } + const StringLiteral *getClobberStringLiteral(unsigned i) const { + return Clobbers[i]; + } SourceRange getSourceRange() const LLVM_READONLY { return SourceRange(AsmLoc, RParenLoc); diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp index 9a31416371ec..0cf3aaf5580c 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -422,7 +422,7 @@ void StmtPrinter::VisitGCCAsmStmt(GCCAsmStmt *Node) { if (i != 0) OS << ", "; - VisitStringLiteral(Node->getClobber(i)); + VisitStringLiteral(Node->getClobberStringLiteral(i)); } OS << ");\n"; diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp index e4a2e876fb58..5d7f9f8edee2 100644 --- a/clang/lib/AST/StmtProfile.cpp +++ b/clang/lib/AST/StmtProfile.cpp @@ -175,7 +175,7 @@ void StmtProfiler::VisitGCCAsmStmt(const GCCAsmStmt *S) { } ID.AddInteger(S->getNumClobbers()); for (unsigned I = 0, N = S->getNumClobbers(); I != N; ++I) - VisitStringLiteral(S->getClobber(I)); + VisitStringLiteral(S->getClobberStringLiteral(I)); } void StmtProfiler::VisitMSAsmStmt(const MSAsmStmt *S) { diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index 747dd5425f4b..3ebfbddba444 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -1581,7 +1581,7 @@ void CodeGenFunction::EmitGCCAsmStmt(const GCCAsmStmt &S) { // Clobbers for (unsigned i = 0, e = S.getNumClobbers(); i != e; i++) { - StringRef Clobber = S.getClobber(i)->getString(); + StringRef Clobber = S.getClobberStringLiteral(i)->getString(); if (Clobber != "memory" && Clobber != "cc") Clobber = Target.getNormalizedGCCRegisterName(Clobber); diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index 4b780f6bc0fd..ef58cb62b984 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -5568,7 +5568,7 @@ TreeTransform::TransformGCCAsmStmt(GCCAsmStmt *S) { // Go through the clobbers. for (unsigned I = 0, E = S->getNumClobbers(); I != E; ++I) - Clobbers.push_back(S->getClobber(I)); + Clobbers.push_back(S->getClobberStringLiteral(I)); // No need to transform the asm string literal. AsmString = SemaRef.Owned(S->getAsmString()); diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp index 15941783493a..5fa08d256cdc 100644 --- a/clang/lib/Serialization/ASTWriterStmt.cpp +++ b/clang/lib/Serialization/ASTWriterStmt.cpp @@ -245,7 +245,7 @@ void ASTStmtWriter::VisitGCCAsmStmt(GCCAsmStmt *S) { // Clobbers for (unsigned I = 0, N = S->getNumClobbers(); I != N; ++I) - Writer.AddStmt(S->getClobber(I)); + Writer.AddStmt(S->getClobberStringLiteral(I)); Code = serialization::STMT_GCCASM; } diff --git a/clang/tools/libclang/RecursiveASTVisitor.h b/clang/tools/libclang/RecursiveASTVisitor.h index 6060ab6bffae..ab96f36205b9 100644 --- a/clang/tools/libclang/RecursiveASTVisitor.h +++ b/clang/tools/libclang/RecursiveASTVisitor.h @@ -1762,7 +1762,7 @@ DEF_TRAVERSE_STMT(GCCAsmStmt, { StmtQueue.queue(S->getOutputConstraintLiteral(I)); } for (unsigned I = 0, E = S->getNumClobbers(); I < E; ++I) { - StmtQueue.queue(S->getClobber(I)); + StmtQueue.queue(S->getClobberStringLiteral(I)); } // children() iterates over inputExpr and outputExpr. })