On Aug 20, 2012, at 3:27 PM, David Blaikie wrote: > On Mon, Aug 20, 2012 at 10:11 AM, Chad Rosier <[email protected]> wrote: >> Author: mcrosier >> Date: Mon Aug 20 12:11:53 2012 >> New Revision: 162210 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=162210&view=rev >> Log: >> [ms-inline asm] Remove old cruft now that MS-style asms their own code path. > > This change made the MSAsm member of AsmStmt unused (triggering an > unused member warning from Clang). Assuming this was an intentional > consequence of the cleanup, I removed it in r162235.
Yes, your assumption is correct. Thanks, David! > > - David > >> >> Modified: >> cfe/trunk/include/clang/AST/Stmt.h >> cfe/trunk/include/clang/Sema/Sema.h >> cfe/trunk/lib/AST/Stmt.cpp >> cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp >> cfe/trunk/lib/Sema/SemaStmtAsm.cpp >> cfe/trunk/lib/Sema/TreeTransform.h >> cfe/trunk/lib/Serialization/ASTReaderStmt.cpp >> cfe/trunk/lib/Serialization/ASTWriterStmt.cpp >> >> Modified: cfe/trunk/include/clang/AST/Stmt.h >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Stmt.h?rev=162210&r1=162209&r2=162210&view=diff >> ============================================================================== >> --- cfe/trunk/include/clang/AST/Stmt.h (original) >> +++ cfe/trunk/include/clang/AST/Stmt.h Mon Aug 20 12:11:53 2012 >> @@ -1385,10 +1385,10 @@ >> >> public: >> AsmStmt(ASTContext &C, SourceLocation asmloc, bool issimple, bool >> isvolatile, >> - bool msasm, unsigned numoutputs, unsigned numinputs, >> - IdentifierInfo **names, StringLiteral **constraints, >> - Expr **exprs, StringLiteral *asmstr, unsigned numclobbers, >> - StringLiteral **clobbers, SourceLocation rparenloc); >> + unsigned numoutputs, unsigned numinputs, IdentifierInfo **names, >> + StringLiteral **constraints, Expr **exprs, StringLiteral *asmstr, >> + unsigned numclobbers, StringLiteral **clobbers, >> + SourceLocation rparenloc); >> >> /// \brief Build an empty inline-assembly statement. >> explicit AsmStmt(EmptyShell Empty) : Stmt(AsmStmtClass, Empty), >> @@ -1403,8 +1403,6 @@ >> void setVolatile(bool V) { IsVolatile = V; } >> bool isSimple() const { return IsSimple; } >> void setSimple(bool V) { IsSimple = V; } >> - bool isMSAsm() const { return MSAsm; } >> - void setMSAsm(bool V) { MSAsm = V; } >> >> //===--- Asm String Analysis ---===// >> >> >> Modified: cfe/trunk/include/clang/Sema/Sema.h >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Sema.h?rev=162210&r1=162209&r2=162210&view=diff >> ============================================================================== >> --- cfe/trunk/include/clang/Sema/Sema.h (original) >> +++ cfe/trunk/include/clang/Sema/Sema.h Mon Aug 20 12:11:53 2012 >> @@ -2544,8 +2544,7 @@ >> MultiExprArg Exprs, >> Expr *AsmString, >> MultiExprArg Clobbers, >> - SourceLocation RParenLoc, >> - bool MSAsm = false); >> + SourceLocation RParenLoc); >> >> StmtResult ActOnMSAsmStmt(SourceLocation AsmLoc, >> SourceLocation LBraceLoc, >> >> Modified: cfe/trunk/lib/AST/Stmt.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Stmt.cpp?rev=162210&r1=162209&r2=162210&view=diff >> ============================================================================== >> --- cfe/trunk/lib/AST/Stmt.cpp (original) >> +++ cfe/trunk/lib/AST/Stmt.cpp Mon Aug 20 12:11:53 2012 >> @@ -559,14 +559,13 @@ >> //===----------------------------------------------------------------------===// >> >> AsmStmt::AsmStmt(ASTContext &C, SourceLocation asmloc, bool issimple, >> - bool isvolatile, bool msasm, >> - unsigned numoutputs, unsigned numinputs, >> + bool isvolatile, unsigned numoutputs, unsigned numinputs, >> IdentifierInfo **names, StringLiteral **constraints, >> Expr **exprs, StringLiteral *asmstr, unsigned numclobbers, >> StringLiteral **clobbers, SourceLocation rparenloc) >> : Stmt(AsmStmtClass), AsmLoc(asmloc), RParenLoc(rparenloc), AsmStr(asmstr) >> - , IsSimple(issimple), IsVolatile(isvolatile), MSAsm(msasm) >> - , NumOutputs(numoutputs), NumInputs(numinputs), NumClobbers(numclobbers) { >> + , IsSimple(issimple), IsVolatile(isvolatile), NumOutputs(numoutputs) >> + , NumInputs(numinputs), NumClobbers(numclobbers) { >> >> unsigned NumExprs = NumOutputs + NumInputs; >> >> >> Modified: cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp?rev=162210&r1=162209&r2=162210&view=diff >> ============================================================================== >> --- cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp (original) >> +++ cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp Mon Aug 20 12:11:53 2012 >> @@ -182,13 +182,6 @@ >> HasFakeEdge = true; >> continue; >> } >> - if (const AsmStmt *AS = dyn_cast<AsmStmt>(S)) { >> - if (AS->isMSAsm()) { >> - HasFakeEdge = true; >> - HasLiveReturn = true; >> - continue; >> - } >> - } >> if (isa<MSAsmStmt>(S)) { >> // TODO: Verify this is correct. >> HasFakeEdge = true; >> >> Modified: cfe/trunk/lib/Sema/SemaStmtAsm.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaStmtAsm.cpp?rev=162210&r1=162209&r2=162210&view=diff >> ============================================================================== >> --- cfe/trunk/lib/Sema/SemaStmtAsm.cpp (original) >> +++ cfe/trunk/lib/Sema/SemaStmtAsm.cpp Mon Aug 20 12:11:53 2012 >> @@ -94,7 +94,7 @@ >> unsigned NumInputs, IdentifierInfo **Names, >> MultiExprArg constraints, MultiExprArg exprs, >> Expr *asmString, MultiExprArg clobbers, >> - SourceLocation RParenLoc, bool MSAsm) { >> + SourceLocation RParenLoc) { >> unsigned NumClobbers = clobbers.size(); >> StringLiteral **Constraints = >> reinterpret_cast<StringLiteral**>(constraints.get()); >> @@ -199,9 +199,9 @@ >> } >> >> AsmStmt *NS = >> - new (Context) AsmStmt(Context, AsmLoc, IsSimple, IsVolatile, MSAsm, >> - NumOutputs, NumInputs, Names, Constraints, Exprs, >> - AsmString, NumClobbers, Clobbers, RParenLoc); >> + new (Context) AsmStmt(Context, AsmLoc, IsSimple, IsVolatile, NumOutputs, >> + NumInputs, Names, Constraints, Exprs, AsmString, >> + NumClobbers, Clobbers, RParenLoc); >> // Validate the asm string, ensuring it makes sense given the operands we >> // have. >> SmallVector<AsmStmt::AsmStringPiece, 8> Pieces; >> >> Modified: cfe/trunk/lib/Sema/TreeTransform.h >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/TreeTransform.h?rev=162210&r1=162209&r2=162210&view=diff >> ============================================================================== >> --- cfe/trunk/lib/Sema/TreeTransform.h (original) >> +++ cfe/trunk/lib/Sema/TreeTransform.h Mon Aug 20 12:11:53 2012 >> @@ -1172,12 +1172,11 @@ >> MultiExprArg Exprs, >> Expr *AsmString, >> MultiExprArg Clobbers, >> - SourceLocation RParenLoc, >> - bool MSAsm) { >> + SourceLocation RParenLoc) { >> return getSema().ActOnAsmStmt(AsmLoc, IsSimple, IsVolatile, NumOutputs, >> NumInputs, Names, move(Constraints), >> Exprs, AsmString, Clobbers, >> - RParenLoc, MSAsm); >> + RParenLoc); >> } >> >> /// \brief Build a new MS style inline asm statement. >> @@ -5600,8 +5599,7 @@ >> move_arg(Exprs), >> AsmString.get(), >> move_arg(Clobbers), >> - S->getRParenLoc(), >> - S->isMSAsm()); >> + S->getRParenLoc()); >> } >> >> template<typename Derived> >> >> Modified: cfe/trunk/lib/Serialization/ASTReaderStmt.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReaderStmt.cpp?rev=162210&r1=162209&r2=162210&view=diff >> ============================================================================== >> --- cfe/trunk/lib/Serialization/ASTReaderStmt.cpp (original) >> +++ cfe/trunk/lib/Serialization/ASTReaderStmt.cpp Mon Aug 20 12:11:53 2012 >> @@ -297,7 +297,6 @@ >> S->setRParenLoc(ReadSourceLocation(Record, Idx)); >> S->setVolatile(Record[Idx++]); >> S->setSimple(Record[Idx++]); >> - S->setMSAsm(Record[Idx++]); >> >> S->setAsmString(cast_or_null<StringLiteral>(Reader.ReadSubStmt())); >> >> >> Modified: cfe/trunk/lib/Serialization/ASTWriterStmt.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriterStmt.cpp?rev=162210&r1=162209&r2=162210&view=diff >> ============================================================================== >> --- cfe/trunk/lib/Serialization/ASTWriterStmt.cpp (original) >> +++ cfe/trunk/lib/Serialization/ASTWriterStmt.cpp Mon Aug 20 12:11:53 2012 >> @@ -227,7 +227,6 @@ >> Writer.AddSourceLocation(S->getRParenLoc(), Record); >> Record.push_back(S->isVolatile()); >> Record.push_back(S->isSimple()); >> - Record.push_back(S->isMSAsm()); >> Writer.AddStmt(S->getAsmString()); >> >> // Outputs >> >> >> _______________________________________________ >> cfe-commits mailing list >> [email protected] >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
