Subversion Repositories QNX 8.QNX8 LLVM/Clang compiler suite

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. //===- Formatters.h ---------------------------------------------*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8.  
  9. #ifndef LLVM_DEBUGINFO_PDB_NATIVE_FORMATTERS_H
  10. #define LLVM_DEBUGINFO_PDB_NATIVE_FORMATTERS_H
  11.  
  12. #include "llvm/ADT/ArrayRef.h"
  13. #include "llvm/ADT/StringRef.h"
  14. #include "llvm/DebugInfo/CodeView/Formatters.h"
  15. #include "llvm/DebugInfo/PDB/Native/RawConstants.h"
  16. #include "llvm/DebugInfo/PDB/Native/RawTypes.h"
  17. #include "llvm/Support/FormatProviders.h"
  18.  
  19. #define FORMAT_CASE(Value, Name)                                               \
  20.   case Value:                                                                  \
  21.     Stream << Name;                                                            \
  22.     break;
  23.  
  24. namespace llvm {
  25. template <> struct format_provider<pdb::PdbRaw_ImplVer> {
  26.   static void format(const pdb::PdbRaw_ImplVer &V, llvm::raw_ostream &Stream,
  27.                      StringRef Style) {
  28.     switch (V) {
  29.       FORMAT_CASE(pdb::PdbRaw_ImplVer::PdbImplVC110, "VC110")
  30.       FORMAT_CASE(pdb::PdbRaw_ImplVer::PdbImplVC140, "VC140")
  31.       FORMAT_CASE(pdb::PdbRaw_ImplVer::PdbImplVC2, "VC2")
  32.       FORMAT_CASE(pdb::PdbRaw_ImplVer::PdbImplVC4, "VC4")
  33.       FORMAT_CASE(pdb::PdbRaw_ImplVer::PdbImplVC41, "VC41")
  34.       FORMAT_CASE(pdb::PdbRaw_ImplVer::PdbImplVC50, "VC50")
  35.       FORMAT_CASE(pdb::PdbRaw_ImplVer::PdbImplVC70, "VC70")
  36.       FORMAT_CASE(pdb::PdbRaw_ImplVer::PdbImplVC70Dep, "VC70Dep")
  37.       FORMAT_CASE(pdb::PdbRaw_ImplVer::PdbImplVC80, "VC80")
  38.       FORMAT_CASE(pdb::PdbRaw_ImplVer::PdbImplVC98, "VC98")
  39.     }
  40.   }
  41. };
  42. }
  43.  
  44. #endif
  45.