From 1a9ed33a8bfe36eaec0c1c119b93f8879584c08b Mon Sep 17 00:00:00 2001 From: Yaron Keren Date: Mon, 10 Aug 2015 07:04:29 +0000 Subject: [PATCH] Rangify for loop, NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244434 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Bitcode/Writer/BitcodeWriter.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index dadc56e0e42..0d1a2accc4f 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -2079,10 +2079,7 @@ static void WriteValueSymbolTable(const ValueSymbolTable &VST, // FIXME: We know if the type names can use 7-bit ascii. SmallVector NameVals; - for (ValueSymbolTable::const_iterator SI = VST.begin(), SE = VST.end(); - SI != SE; ++SI) { - - const ValueName &Name = *SI; + for (const ValueName &Name : VST) { // Figure out the encoding to use for the name. bool is7Bit = true; @@ -2102,7 +2099,7 @@ static void WriteValueSymbolTable(const ValueSymbolTable &VST, // VST_ENTRY: [valueid, namechar x N] // VST_BBENTRY: [bbid, namechar x N] unsigned Code; - if (isa(SI->getValue())) { + if (isa(Name.getValue())) { Code = bitc::VST_CODE_BBENTRY; if (isChar6) AbbrevToUse = VST_BBENTRY_6_ABBREV; @@ -2114,7 +2111,7 @@ static void WriteValueSymbolTable(const ValueSymbolTable &VST, AbbrevToUse = VST_ENTRY_7_ABBREV; } - NameVals.push_back(VE.getValueID(SI->getValue())); + NameVals.push_back(VE.getValueID(Name.getValue())); for (const char *P = Name.getKeyData(), *E = Name.getKeyData()+Name.getKeyLength(); P != E; ++P) NameVals.push_back((unsigned char)*P); -- 2.34.1