Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: src/IceInst.cpp

Issue 1516753008: Subzero: Use "auto" per (unwritten) auto coding style. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: More <cast> instances without the llvm:: prefix Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | src/IceInstARM32.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInst.cpp
diff --git a/src/IceInst.cpp b/src/IceInst.cpp
index 6fb8780f44ae77ee16290006d0ed68f20e96e8e8..a15d1b68802e3643503931448f1ec5ef0ada333e 100644
--- a/src/IceInst.cpp
+++ b/src/IceInst.cpp
@@ -94,7 +94,7 @@ void Inst::deleteIfDead() {
bool Inst::isLastUse(const Operand *TestSrc) const {
if (LiveRangesEnded == 0)
return false; // early-exit optimization
- if (const Variable *TestVar = llvm::dyn_cast<const Variable>(TestSrc)) {
+ if (auto *TestVar = llvm::dyn_cast<const Variable>(TestSrc)) {
LREndedBits Mask = LiveRangesEnded;
FOREACH_VAR_IN_INST(Var, *this) {
if (Var == TestVar) {
@@ -366,7 +366,7 @@ void InstPhi::livenessPhiOperand(LivenessBV &Live, CfgNode *Target,
return;
for (SizeT I = 0; I < getSrcSize(); ++I) {
if (Labels[I] == Target) {
- if (Variable *Var = llvm::dyn_cast<Variable>(getSrc(I))) {
+ if (auto *Var = llvm::dyn_cast<Variable>(getSrc(I))) {
SizeT SrcIndex = Liveness->getLiveIndex(Var->getIndex());
if (!Live[SrcIndex]) {
setLastUse(I);
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | src/IceInstARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698