From 58d5e051574339106ce4139697ebadd21e34dbc0 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Sun, 9 Mar 2008 18:32:50 +0000 Subject: [PATCH] Fix some compilation errors on msvc: - "Redefinition of I" (iterator masks previous definition) - include missing header file Patch by Argiris Kirtzidis! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48115 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Linker/LinkModules.cpp | 6 +++--- lib/Transforms/IPO/ExtractGV.cpp | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index 5545af69f16..ad6852dce6a 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -597,9 +597,9 @@ static bool LinkAlias(Module *Dest, const Module *Src, // Globals were already linked, thus we can just query ValueMap for variant // of SAliasee in Dest - std::map::const_iterator I = ValueMap.find(SAliasee); - assert(I != ValueMap.end() && "Aliasee not linked"); - GlobalValue* DAliasee = cast(I->second); + std::map::const_iterator VMI = ValueMap.find(SAliasee); + assert(VMI != ValueMap.end() && "Aliasee not linked"); + GlobalValue* DAliasee = cast(VMI->second); // Try to find something 'similar' to SGA in destination module. if (GlobalAlias *DGA = Dest->getNamedAlias(SGA->getName())) { diff --git a/lib/Transforms/IPO/ExtractGV.cpp b/lib/Transforms/IPO/ExtractGV.cpp index a230dd1db88..882097cae55 100644 --- a/lib/Transforms/IPO/ExtractGV.cpp +++ b/lib/Transforms/IPO/ExtractGV.cpp @@ -17,6 +17,7 @@ #include "llvm/Constants.h" #include "llvm/Transforms/IPO.h" #include "llvm/Support/Compiler.h" +#include using namespace llvm; namespace {