Whitespace and other cleanup. Functionallity unchanged.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132533 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp
index c4ef57c..bc995ae 100644
--- a/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -1852,7 +1852,6 @@
FunctionBBs[i] = BasicBlock::Create(Context, "", F);
CurBB = FunctionBBs[0];
continue;
-
case bitc::FUNC_CODE_DEBUG_LOC_AGAIN: // DEBUG_LOC_AGAIN
// This record indicates that the last instruction is at the same
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp
index e652e08..2ec10c0 100644
--- a/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -100,8 +100,6 @@
}
}
-
-
static void WriteStringRecord(unsigned Code, const std::string &Str,
unsigned AbbrevToUse, BitstreamWriter &Stream) {
SmallVector<unsigned, 64> Vals;
@@ -447,7 +445,6 @@
Vals.clear();
}
-
// Emit the alias information.
for (Module::const_alias_iterator AI = M->alias_begin(), E = M->alias_end();
AI != E; ++AI) {
@@ -1208,7 +1205,7 @@
static void WriteFunction(const Function &F, ValueEnumerator &VE,
BitstreamWriter &Stream) {
Stream.EnterSubblock(bitc::FUNCTION_BLOCK_ID, 4);
- VE.incorporateFunction(F);
+ VE.IncorporateFunction(F);
SmallVector<unsigned, 64> Vals;
@@ -1272,7 +1269,7 @@
if (NeedsMetadataAttachment)
WriteMetadataAttachment(F, VE, Stream);
- VE.purgeFunction();
+ VE.PurgeFunction();
Stream.ExitBlock();
}
@@ -1512,9 +1509,9 @@
WriteModuleMetadata(M, VE, Stream);
// Emit function bodies.
- for (Module::const_iterator I = M->begin(), E = M->end(); I != E; ++I)
- if (!I->isDeclaration())
- WriteFunction(*I, VE, Stream);
+ for (Module::const_iterator F = M->begin(), E = M->end(); F != E; ++F)
+ if (!F->isDeclaration())
+ WriteFunction(*F, VE, Stream);
// Emit metadata.
WriteModuleMetadataStore(M, Stream);
diff --git a/lib/Bitcode/Writer/ValueEnumerator.cpp b/lib/Bitcode/Writer/ValueEnumerator.cpp
index 21f004a..4fffa6f 100644
--- a/lib/Bitcode/Writer/ValueEnumerator.cpp
+++ b/lib/Bitcode/Writer/ValueEnumerator.cpp
@@ -452,8 +452,7 @@
}
}
-
-void ValueEnumerator::incorporateFunction(const Function &F) {
+void ValueEnumerator::IncorporateFunction(const Function &F) {
InstructionCount = 0;
NumModuleValues = Values.size();
NumModuleMDValues = MDValues.size();
@@ -517,7 +516,7 @@
EnumerateFunctionLocalMetadata(FnLocalMDVector[i]);
}
-void ValueEnumerator::purgeFunction() {
+void ValueEnumerator::PurgeFunction() {
/// Remove purged values from the ValueMap.
for (unsigned i = NumModuleValues, e = Values.size(); i != e; ++i)
ValueMap.erase(Values[i].first);
diff --git a/lib/Bitcode/Writer/ValueEnumerator.h b/lib/Bitcode/Writer/ValueEnumerator.h
index 1e42a26..8b2a08c 100644
--- a/lib/Bitcode/Writer/ValueEnumerator.h
+++ b/lib/Bitcode/Writer/ValueEnumerator.h
@@ -127,11 +127,11 @@
/// should only be used by rare constructs such as address-of-label.
unsigned getGlobalBasicBlockID(const BasicBlock *BB) const;
- /// incorporateFunction/purgeFunction - If you'd like to deal with a function,
+ /// IncorporateFunction/PurgeFunction - If you'd like to deal with a function,
/// use these two methods to get its data into the ValueEnumerator!
///
- void incorporateFunction(const Function &F);
- void purgeFunction();
+ void IncorporateFunction(const Function &F);
+ void PurgeFunction();
private:
void OptimizeConstants(unsigned CstStart, unsigned CstEnd);