diff options
author | Duncan Sands <baldrick@free.fr> | 2008-11-02 09:00:33 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-11-02 09:00:33 +0000 |
commit | cede1e035c672976a48ca94d61c8a2b60257b822 (patch) | |
tree | e9bae862c7aadbf9aaae6727891b8e8fc7025591 | |
parent | 2bb2aaa775e1a88dac9e0729b3a1726ff4c15dfa (diff) | |
download | bcm5719-llvm-cede1e035c672976a48ca94d61c8a2b60257b822.tar.gz bcm5719-llvm-cede1e035c672976a48ca94d61c8a2b60257b822.zip |
Get this building on 64 bit machines (error:
cast from ‘const llvm::PointerType*’ to ‘unsigned int’
loses precision).
llvm-svn: 58561
-rw-r--r-- | llvm/lib/Transforms/IPO/MergeFunctions.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/IPO/MergeFunctions.cpp b/llvm/lib/Transforms/IPO/MergeFunctions.cpp index 563ed7db76f..6737b34b874 100644 --- a/llvm/lib/Transforms/IPO/MergeFunctions.cpp +++ b/llvm/lib/Transforms/IPO/MergeFunctions.cpp @@ -80,8 +80,8 @@ ModulePass *llvm::createMergeFunctionsPass() { return new MergeFunctions(); } -static unsigned hash(const Function *F) { - return F->size() ^ reinterpret_cast<unsigned>(F->getType()); +static unsigned long hash(const Function *F) { + return F->size() ^ reinterpret_cast<unsigned long>(F->getType()); //return F->size() ^ F->arg_size() ^ F->getReturnType(); } @@ -304,7 +304,7 @@ static bool hasAddressTaken(User *U) { bool MergeFunctions::runOnModule(Module &M) { bool Changed = false; - std::map<unsigned, std::vector<Function *> > FnMap; + std::map<unsigned long, std::vector<Function *> > FnMap; for (Module::iterator F = M.begin(), E = M.end(); F != E; ++F) { if (F->isDeclaration() || F->isIntrinsic()) @@ -326,8 +326,8 @@ bool MergeFunctions::runOnModule(Module &M) { bool LocalChanged; do { LocalChanged = false; - for (std::map<unsigned, std::vector<Function *> >::iterator I = FnMap.begin(), - E = FnMap.end(); I != E; ++I) { + for (std::map<unsigned long, std::vector<Function *> >::iterator + I = FnMap.begin(), E = FnMap.end(); I != E; ++I) { DOUT << "size: " << FnMap.size() << "\n"; std::vector<Function *> &FnVec = I->second; DOUT << "hash (" << I->first << "): " << FnVec.size() << "\n"; |