From 5baf8ece830b7a14ac466d09d6a113205296f6ee Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Sun, 2 Nov 2008 09:00:33 +0000 Subject: [PATCH] =?UTF-8?q?Get=20this=20building=20on=2064=20bit=20machine?= =?UTF-8?q?s=20(error:=20cast=20from=20=E2=80=98const=20llvm::PointerType*?= =?UTF-8?q?=E2=80=99=20to=20=E2=80=98unsigned=20int=E2=80=99=20loses=20pre?= =?UTF-8?q?cision).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58561 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/MergeFunctions.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Transforms/IPO/MergeFunctions.cpp b/lib/Transforms/IPO/MergeFunctions.cpp index 563ed7db76f..6737b34b874 100644 --- a/lib/Transforms/IPO/MergeFunctions.cpp +++ b/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(F->getType()); +static unsigned long hash(const Function *F) { + return F->size() ^ reinterpret_cast(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 > FnMap; + std::map > 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 >::iterator I = FnMap.begin(), - E = FnMap.end(); I != E; ++I) { + for (std::map >::iterator + I = FnMap.begin(), E = FnMap.end(); I != E; ++I) { DOUT << "size: " << FnMap.size() << "\n"; std::vector &FnVec = I->second; DOUT << "hash (" << I->first << "): " << FnVec.size() << "\n";