1. Nov 12, 2016
    • Greg Clayton's avatar
      Fix windows buildbot where warnings are errors. We had a switch statement... · e50b286c
      Greg Clayton authored
      Fix windows buildbot where warnings are errors. We had a switch statement where all enumerations were handled, but some compilers don't recognize this. Simplify the logic so that all compilers will know a return value is returned in all cases.
      
      llvm-svn: 286600
      e50b286c
    • Douglas Katzman's avatar
      Fix mismatched enum value name and diagnostic text. · 18052989
      Douglas Katzman authored
      ExpectedFunctionGlobalVarMethodOrProperty
      would previously say "functions and global variables"
      instead of "functions, methods, properties, and global variables"
      
      The newly added ExpectedFunctionOrGlobalVariable
      says "functions and global variables"
      
      Differential Revision: https://reviews.llvm.org/D26459
      
      llvm-svn: 286599
      18052989
    • Greg Clayton's avatar
      a6ccd190
    • Greg Clayton's avatar
      Clean up DWARFFormValue by reducing duplicated code and removing... · 82f12b14
      Greg Clayton authored
      Clean up DWARFFormValue by reducing duplicated code and removing DWARFFormValue::getFixedFormSizes()
      
      In preparation for a follow on patch that improves DWARF parsing speed, clean up DWARFFormValue so that we have can get the fixed byte size of a form value given a DWARFUnit or given the version, address byte size and dwarf32/64.
      
      This patch cleans up code so that everyone is using one of the new DWARFFormValue functions:
      
      static Optional<uint8_t> DWARFFormValue::getFixedByteSize(dwarf::Form Form, const DWARFUnit *U = nullptr);
      static Optional<uint8_t> DWARFFormValue::getFixedByteSize(dwarf::Form Form, uint16_t Version, uint8_t AddrSize, bool Dwarf32);
      
      This patch changes DWARFFormValue::skipValue() to rely on the output of DWARFFormValue::getFixedByteSize(...) instead of duplicating the code in each function. This will reduce the number of changes we need to make to DWARF to fewer places in DWARFFormValue when we add support for new form.
      
      This patch also starts to support DWARF64 so that we can get correct byte sizes for forms that vary according the DWARF 32/64.
      
      To reduce the code duplication a new FormSizeHelper pure virtual class was created that can be created as a FormSizeHelperDWARFUnit when you have a DWARFUnit, or FormSizeHelperManual where you manually specify the DWARF version, address byte size and DWARF32/DWARF64. There is now a single implementation of a function that gets the fixed byte size (instead of two where one took a DWARFUnit and one took the DWARF version, address byte size and DWARFFormat enum) and one function to skip the form values.
      
      https://reviews.llvm.org/D26526
      
      llvm-svn: 286597
      82f12b14
  2. Nov 11, 2016