Commit 48e09faa authored by Raphael Isemann's avatar Raphael Isemann
Browse files

[lldb][NFC] Another attempt to fix GCC 5.x compilation

37510f69 tried to fix GCC 5.x compilation
by making the enum which is used as a unordered_map key unscoped. However it
seems that in GCC 5.x, enum keys are not supported *at all* in unordered_maps
(at least that's what some trial&error on godbolt tells me). This updates the
workaround to just use an int until GCC 5.x support is dropped.
parent 8262cd8a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1220,10 +1220,13 @@ private:
  /// imported types.
  std::unique_ptr<ClangASTSource> m_scratch_ast_source_up;

  // FIXME: GCC 5.x doesn't support enum as map keys.
  typedef int IsolatedASTKey;

  /// Map from IsolatedASTKind to their actual TypeSystemClang instance.
  /// This map is lazily filled with sub-ASTs and should be accessed via
  /// `GetSubAST` (which lazily fills this map).
  std::unordered_map<IsolatedASTKind, std::unique_ptr<TypeSystemClang>>
  std::unordered_map<IsolatedASTKey, std::unique_ptr<TypeSystemClang>>
      m_isolated_asts;
};