From 774cca70b10bc679daff8203d639d9004a2eb194 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Thu, 24 Jun 2010 00:00:42 +0000 Subject: [PATCH] Use available typedef for " DenseMap". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106699 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/CloneFunction.cpp | 12 ++++++------ lib/Transforms/Utils/CloneModule.cpp | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/Transforms/Utils/CloneFunction.cpp b/lib/Transforms/Utils/CloneFunction.cpp index 64f5f4f8d60..1dcfd578784 100644 --- a/lib/Transforms/Utils/CloneFunction.cpp +++ b/lib/Transforms/Utils/CloneFunction.cpp @@ -32,7 +32,7 @@ using namespace llvm; // CloneBasicBlock - See comments in Cloning.h BasicBlock *llvm::CloneBasicBlock(const BasicBlock *BB, - DenseMap &VMap, + ValueToValueMapTy &VMap, const Twine &NameSuffix, Function *F, ClonedCodeInfo *CodeInfo) { BasicBlock *NewBB = BasicBlock::Create(BB->getContext(), "", F); @@ -72,7 +72,7 @@ BasicBlock *llvm::CloneBasicBlock(const BasicBlock *BB, // ArgMap values. // void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc, - DenseMap &VMap, + ValueToValueMapTy &VMap, SmallVectorImpl &Returns, const char *NameSuffix, ClonedCodeInfo *CodeInfo) { assert(NameSuffix && "NameSuffix cannot be null!"); @@ -138,7 +138,7 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc, /// the function from their old to new values. /// Function *llvm::CloneFunction(const Function *F, - DenseMap &VMap, + ValueToValueMapTy &VMap, ClonedCodeInfo *CodeInfo) { std::vector ArgTypes; @@ -179,14 +179,14 @@ namespace { struct PruningFunctionCloner { Function *NewFunc; const Function *OldFunc; - DenseMap &VMap; + ValueToValueMapTy &VMap; SmallVectorImpl &Returns; const char *NameSuffix; ClonedCodeInfo *CodeInfo; const TargetData *TD; public: PruningFunctionCloner(Function *newFunc, const Function *oldFunc, - DenseMap &valueMap, + ValueToValueMapTy &valueMap, SmallVectorImpl &returns, const char *nameSuffix, ClonedCodeInfo *codeInfo, @@ -363,7 +363,7 @@ static MDNode *UpdateInlinedAtInfo(MDNode *InsnMD, MDNode *TheCallMD) { /// dead. Since this doesn't produce an exact copy of the input, it can't be /// used for things like CloneFunction or CloneModule. void llvm::CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc, - DenseMap &VMap, + ValueToValueMapTy &VMap, SmallVectorImpl &Returns, const char *NameSuffix, ClonedCodeInfo *CodeInfo, diff --git a/lib/Transforms/Utils/CloneModule.cpp b/lib/Transforms/Utils/CloneModule.cpp index cdc9b46979f..fc603d23e9a 100644 --- a/lib/Transforms/Utils/CloneModule.cpp +++ b/lib/Transforms/Utils/CloneModule.cpp @@ -28,12 +28,12 @@ using namespace llvm; Module *llvm::CloneModule(const Module *M) { // Create the value map that maps things from the old module over to the new // module. - DenseMap VMap; + ValueToValueMapTy VMap; return CloneModule(M, VMap); } Module *llvm::CloneModule(const Module *M, - DenseMap &VMap) { + ValueToValueMapTy &VMap) { // First off, we need to create the new module... Module *New = new Module(M->getModuleIdentifier(), M->getContext()); New->setDataLayout(M->getDataLayout());