Skip to content

Commit 71a81f8

Browse files
Teemperormemfrob
authored andcommitted
[lldb][NFC] Another attempt to fix GCC 5.x compilation
37510f69b4cb8d76064f108d57bebe95984a23ae 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.
1 parent 29d1134 commit 71a81f8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1220,10 +1220,13 @@ class ScratchTypeSystemClang : public TypeSystemClang {
12201220
/// imported types.
12211221
std::unique_ptr<ClangASTSource> m_scratch_ast_source_up;
12221222

1223+
// FIXME: GCC 5.x doesn't support enum as map keys.
1224+
typedef int IsolatedASTKey;
1225+
12231226
/// Map from IsolatedASTKind to their actual TypeSystemClang instance.
12241227
/// This map is lazily filled with sub-ASTs and should be accessed via
12251228
/// `GetSubAST` (which lazily fills this map).
1226-
std::unordered_map<IsolatedASTKind, std::unique_ptr<TypeSystemClang>>
1229+
std::unordered_map<IsolatedASTKey, std::unique_ptr<TypeSystemClang>>
12271230
m_isolated_asts;
12281231
};
12291232

0 commit comments

Comments
 (0)