Fix GCC again.
authorMichael J. Spencer <bigcheesegs@gmail.com>
Fri, 7 Oct 2011 19:46:12 +0000 (19:46 +0000)
committerMichael J. Spencer <bigcheesegs@gmail.com>
Fri, 7 Oct 2011 19:46:12 +0000 (19:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141389 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Object/ELFObjectFile.cpp
tools/llvm-nm/llvm-nm.cpp

index e427bedb982da71b77a2f88f149e247805e467c8..6a6870a4e5c7990cb4462ac7d4056512c2e005ba 100644 (file)
@@ -762,7 +762,7 @@ error_code ELFObjectFile<target_endianness, is64Bits>
   if (Rel.w.c >= (relocsec->sh_size / relocsec->sh_entsize)) {
     // We have reached the end of the relocations for this section. See if there
     // is another relocation section.
-    typename RelocMap_t::mapped_type &relocseclist =
+    typename RelocMap_t::mapped_type relocseclist =
       SectionRelocMap.lookup(getSection(Rel.w.a));
 
     // Do a binary search for the current reloc section index (which must be
index b8ede8c0356084ef10060464eaac54f87602611d..10cf45072c27fda87d7d8d15050c15c9a81988af 100644 (file)
@@ -271,9 +271,9 @@ static void DumpSymbolNamesFromModule(Module *M) {
 
 static void DumpSymbolNamesFromObject(ObjectFile *obj) {
   error_code ec;
-  for (ObjectFile::symbol_iterator i = obj->begin_symbols(),
-                                   e = obj->end_symbols();
-                                   i != e; i.increment(ec)) {
+  for (symbol_iterator i = obj->begin_symbols(),
+                       e = obj->end_symbols();
+                       i != e; i.increment(ec)) {
     if (error(ec)) break;
     bool internal;
     if (error(i->isInternal(internal))) break;