[PATCH] D15075: No error for conflict between inputs\outputs and clobber list
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 5 13:54:05 PDT 2016
rnk added a comment.
You should use git-clang-format or some equivalent to format your change.
> TargetInfo.h:597
> + StringRef getNormalizedGCCRegisterName(StringRef Name,
> + bool ReturnCanonical = false) const;
>
format
> TargetInfo.h:600
> + virtual StringRef getConstraintRegister(const StringRef &Constraint,
> + const StringRef &Expression) const {
> + return "";
format
> TargetInfo.cpp:405
> +TargetInfo::getNormalizedGCCRegisterName(StringRef Name,
> +bool ReturnCanonical) const {
> assert(isValidGCCRegisterName(Name) && "Invalid register passed in");
format
> SemaStmtAsm.cpp:144
> +StringRef ExtractRegisterName(const Expr *Expression, const TargetInfo &Target) {
> + while (const ImplicitCastExpr *P = dyn_cast<ImplicitCastExpr>(Expression)) {
> + Expression = P->getSubExpr();
This is a reimplementation of Expression->IgnoreImpCasts(), use that instead.
> SemaStmtAsm.cpp:153
> + return Target.isValidGCCRegisterName(Attr->getLabel())
> + ? Target.getNormalizedGCCRegisterName(Attr->getLabel(), true)
> + : "";
format
> SemaStmtAsm.cpp:185
> + // Go over the output's registers we collected
> + if (InOutVars.find(Clobber) != InOutVars.end()){
> + SourceLocation Loc = Clobbers[i]->getLocStart();
This can be InOutVars.count(Clobber), which is more idiomatic for testing set membership.
https://reviews.llvm.org/D15075
More information about the cfe-commits
mailing list