Rename obj2yaml local namespace to avoid conflicts with llvm::yaml.
authorRafael Espindola <rafael.espindola@gmail.com>
Sat, 20 Apr 2013 03:16:59 +0000 (03:16 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sat, 20 Apr 2013 03:16:59 +0000 (03:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179922 91177308-0d34-0410-b5e6-96231b3b80d8

tools/obj2yaml/coff2yaml.cpp
tools/obj2yaml/obj2yaml.cpp
tools/obj2yaml/obj2yaml.h

index 349d0c175624d575d00c17863458f50a88423f12..203754c11c12835369ea30d9bb43a610f838e96d 100644 (file)
@@ -243,7 +243,7 @@ static raw_ostream &yamlCOFFHeader(const object::coff_file_header *Header,
   Out << "  Machine: ";
   Out << nameLookup(MachineTypePairs, Header->Machine, "# Unknown_MachineTypes")
       << " # (";
-  return yaml::writeHexNumber(Out, Header->Machine) << ")\n\n";
+  return objyaml::writeHexNumber(Out, Header->Machine) << ")\n\n";
 }
 
 
@@ -267,12 +267,12 @@ static raw_ostream &yamlCOFFSections(object::COFFObjectFile &Obj,
         << ", ";
     writeBitMask(Out, SectionCharacteristicsPairs2, sect->Characteristics);
     Out << "] # ";
-    yaml::writeHexNumber(Out, sect->Characteristics) << '\n';
+    objyaml::writeHexNumber(Out, sect->Characteristics) << '\n';
 
     ArrayRef<uint8_t> sectionData;
     Obj.getSectionContents(sect, sectionData);
     Out << "    SectionData: ";
-    yaml::writeHexStream(Out, sectionData) << '\n';
+    objyaml::writeHexStream(Out, sectionData) << '\n';
     if (iter->begin_relocations() != iter->end_relocations())
       Out << "    Relocations:\n";
     for (object::relocation_iterator rIter = iter->begin_relocations();
@@ -281,7 +281,7 @@ static raw_ostream &yamlCOFFSections(object::COFFObjectFile &Obj,
 
         Out << "      - !Relocation\n";
         Out << "        VirtualAddress: " ;
-        yaml::writeHexNumber(Out, reloc->VirtualAddress) << '\n';
+        objyaml::writeHexNumber(Out, reloc->VirtualAddress) << '\n';
         Out << "        SymbolTableIndex: " << reloc->SymbolTableIndex << '\n';
         Out << "        Type: "
             << nameLookup(RelocationTypeX86Pairs, reloc->Type) << '\n';
@@ -334,7 +334,7 @@ static raw_ostream& yamlCOFFSymbols(object::COFFObjectFile &Obj,
       Out << "    NumberOfAuxSymbols: "
           << (int) symbol->NumberOfAuxSymbols << '\n';
       Out << "    AuxillaryData: ";
-      yaml::writeHexStream(Out, aux);
+      objyaml::writeHexStream(Out, aux);
     }
 
     Out << '\n';
index f089e0aba5aee6e590ec3a55158128b794a4a27a..821c9ac7d3a1e35f80dfd3c98cbb015f867cc215 100644 (file)
@@ -18,7 +18,7 @@
 
 using namespace llvm;
 
-namespace yaml {  // generic yaml-writing specific routines
+namespace objyaml {  // generic yaml-writing specific routines
 
 unsigned char printable(unsigned char Ch) {
   return Ch >= ' ' && Ch <= '~' ? Ch : '.';
index b4a012607abbcc87708a150470c5ee16705cb26f..7d52a2d177b0736ebd60df873dda36e0b3109d75 100644 (file)
@@ -18,7 +18,7 @@
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/system_error.h"
 
-namespace yaml {  // routines for writing YAML
+namespace objyaml {  // routines for writing YAML
 // Write a hex stream:
 //    <Prefix> !hex: "<hex digits>" #|<ASCII chars>\n
   llvm::raw_ostream &writeHexStream