[llvm] r179922 - Rename obj2yaml local namespace to avoid conflicts with llvm::yaml.

Rafael Espindola rafael.espindola at gmail.com
Fri Apr 19 20:16:59 PDT 2013


Author: rafael
Date: Fri Apr 19 22:16:59 2013
New Revision: 179922

URL: http://llvm.org/viewvc/llvm-project?rev=179922&view=rev
Log:
Rename obj2yaml local namespace to avoid conflicts with llvm::yaml.

Modified:
    llvm/trunk/tools/obj2yaml/coff2yaml.cpp
    llvm/trunk/tools/obj2yaml/obj2yaml.cpp
    llvm/trunk/tools/obj2yaml/obj2yaml.h

Modified: llvm/trunk/tools/obj2yaml/coff2yaml.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/obj2yaml/coff2yaml.cpp?rev=179922&r1=179921&r2=179922&view=diff
==============================================================================
--- llvm/trunk/tools/obj2yaml/coff2yaml.cpp (original)
+++ llvm/trunk/tools/obj2yaml/coff2yaml.cpp Fri Apr 19 22:16:59 2013
@@ -243,7 +243,7 @@ static raw_ostream &yamlCOFFHeader(const
   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(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(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(obje
       Out << "    NumberOfAuxSymbols: "
           << (int) symbol->NumberOfAuxSymbols << '\n';
       Out << "    AuxillaryData: ";
-      yaml::writeHexStream(Out, aux);
+      objyaml::writeHexStream(Out, aux);
     }
 
     Out << '\n';

Modified: llvm/trunk/tools/obj2yaml/obj2yaml.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/obj2yaml/obj2yaml.cpp?rev=179922&r1=179921&r2=179922&view=diff
==============================================================================
--- llvm/trunk/tools/obj2yaml/obj2yaml.cpp (original)
+++ llvm/trunk/tools/obj2yaml/obj2yaml.cpp Fri Apr 19 22:16:59 2013
@@ -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 : '.';

Modified: llvm/trunk/tools/obj2yaml/obj2yaml.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/obj2yaml/obj2yaml.h?rev=179922&r1=179921&r2=179922&view=diff
==============================================================================
--- llvm/trunk/tools/obj2yaml/obj2yaml.h (original)
+++ llvm/trunk/tools/obj2yaml/obj2yaml.h Fri Apr 19 22:16:59 2013
@@ -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





More information about the llvm-commits mailing list