Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Target/NVPTX/NVPTXUtilities.cpp
Show First 20 Lines • Show All 318 Lines • ▼ Show 20 Lines | for (int i = 0, n = alignNode->getNumOperands(); i < n; i++) { | ||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||
return false; | return false; | ||||
} | } | ||||
Function *getMaybeBitcastedCallee(const CallBase *CB) { | |||||
return dyn_cast<Function>(CB->getCalledOperand()->stripPointerCasts()); | |||||
tra: Style nit: no braces for single-statement if bodies. https://llvm.org/docs/CodingStandards. | |||||
Yes. I actually prefer that style too. Too many competing style guides in my head! ldrumm: Yes. I actually prefer that style too. Too many competing style guides in my head! | |||||
} | |||||
} // namespace llvm | } // namespace llvm | ||||
Not Done ReplyInline ActionsThe whole function can be reduced to dyn_cast<Function>(CB->getCalledOperand()->stripPointerCasts()). nikic: The whole function can be reduced to `dyn_cast<Function>(CB->getCalledOperand()… | |||||
Thanks. TIL about stripPointerCasts ldrumm: Thanks. TIL about `stripPointerCasts` |
Style nit: no braces for single-statement if bodies. https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements