diff options
author | Misha Brukman <brukman+llvm@gmail.com> | 2005-04-21 23:48:37 +0000 |
---|---|---|
committer | Misha Brukman <brukman+llvm@gmail.com> | 2005-04-21 23:48:37 +0000 |
commit | b1c9317bb416944ff2b491b20ca28e2241a5f51f (patch) | |
tree | cf2fc5d20be5053bf0ca3ac2f4432d612701ef47 /llvm/lib/Transforms/IPO/ConstantMerge.cpp | |
parent | c88330ad137fc6e1210a6533e0686d5afd77c3fd (diff) | |
download | bcm5719-llvm-b1c9317bb416944ff2b491b20ca28e2241a5f51f.tar.gz bcm5719-llvm-b1c9317bb416944ff2b491b20ca28e2241a5f51f.zip |
Remove trailing whitespace
llvm-svn: 21427
Diffstat (limited to 'llvm/lib/Transforms/IPO/ConstantMerge.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/ConstantMerge.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/IPO/ConstantMerge.cpp b/llvm/lib/Transforms/IPO/ConstantMerge.cpp index 0140228b63a..b6026f27364 100644 --- a/llvm/lib/Transforms/IPO/ConstantMerge.cpp +++ b/llvm/lib/Transforms/IPO/ConstantMerge.cpp @@ -1,10 +1,10 @@ //===- ConstantMerge.cpp - Merge duplicate global constants ---------------===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file defines the interface to a pass that merges duplicate global @@ -60,10 +60,10 @@ bool ConstantMerge::runOnModule(Module &M) { // Only process constants with initializers if (GV->isConstant() && GV->hasInitializer()) { Constant *Init = GV->getInitializer(); - + // Check to see if the initializer is already known... std::map<Constant*, GlobalVariable*>::iterator I = CMap.find(Init); - + if (I == CMap.end()) { // Nope, add it to the map CMap.insert(I, std::make_pair(Init, GV)); } else if (GV->hasInternalLinkage()) { // Yup, this is a duplicate! @@ -75,22 +75,22 @@ bool ConstantMerge::runOnModule(Module &M) { I->second = GV; } } - + if (Replacements.empty()) return MadeChange; CMap.clear(); - + // Now that we have figured out which replacements must be made, do them all // now. This avoid invalidating the pointers in CMap, which are unneeded // now. for (unsigned i = 0, e = Replacements.size(); i != e; ++i) { // Eliminate any uses of the dead global... Replacements[i].first->replaceAllUsesWith(Replacements[i].second); - + // Delete the global value from the module... M.getGlobalList().erase(Replacements[i].first); } - + NumMerged += Replacements.size(); Replacements.clear(); } |