Skip to content

Commit

Permalink
[Attributor][NFC] Clang format Attributor*.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
jdoerfert committed May 11, 2020
1 parent 41379f1 commit a9ee8b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions llvm/lib/Transforms/IPO/Attributor.cpp
Expand Up @@ -1455,7 +1455,8 @@ ChangeStatus Attributor::rewriteFunctionSignatures(
if (ToBeDeletedFunctions.count(OldFn))
continue;

const SmallVectorImpl<std::unique_ptr<ArgumentReplacementInfo>> &ARIs = It.getSecond();
const SmallVectorImpl<std::unique_ptr<ArgumentReplacementInfo>> &ARIs =
It.getSecond();
assert(ARIs.size() == OldFn->arg_size() && "Inconsistent state!");

SmallVector<Type *, 16> NewArgumentTypes;
Expand All @@ -1464,7 +1465,8 @@ ChangeStatus Attributor::rewriteFunctionSignatures(
// Collect replacement argument types and copy over existing attributes.
AttributeList OldFnAttributeList = OldFn->getAttributes();
for (Argument &Arg : OldFn->args()) {
if (const std::unique_ptr<ArgumentReplacementInfo> &ARI = ARIs[Arg.getArgNo()]) {
if (const std::unique_ptr<ArgumentReplacementInfo> &ARI =
ARIs[Arg.getArgNo()]) {
NewArgumentTypes.append(ARI->ReplacementTypes.begin(),
ARI->ReplacementTypes.end());
NewArgumentAttributes.append(ARI->getNumReplacementArgs(),
Expand Down Expand Up @@ -1526,7 +1528,8 @@ ChangeStatus Attributor::rewriteFunctionSignatures(
for (unsigned OldArgNum = 0; OldArgNum < ARIs.size(); ++OldArgNum) {
unsigned NewFirstArgNum = NewArgOperands.size();
(void)NewFirstArgNum; // only used inside assert.
if (const std::unique_ptr<ArgumentReplacementInfo> &ARI = ARIs[OldArgNum]) {
if (const std::unique_ptr<ArgumentReplacementInfo> &ARI =
ARIs[OldArgNum]) {
if (ARI->ACSRepairCB)
ARI->ACSRepairCB(*ARI, ACS, NewArgOperands);
assert(ARI->getNumReplacementArgs() + NewFirstArgNum ==
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/IPO/AttributorAttributes.cpp
Expand Up @@ -539,7 +539,7 @@ static void followUsesInContext(AAType &AA, Attributor &A,
///
template <class AAType, typename StateType = typename AAType::StateType>
static void followUsesInMBEC(AAType &AA, Attributor &A, StateType &S,
Instruction &CtxI) {
Instruction &CtxI) {

// Container for (transitive) uses of the associated value.
SetVector<const Use *> Uses;
Expand Down

0 comments on commit a9ee8b4

Please sign in to comment.