aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/TypeSystem
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2021-01-26 18:13:45 +0100
committerRaphael Isemann <teemperor@gmail.com>2021-01-26 19:13:12 +0100
commit48e09faa9457b99b927ccc0d0fbbe452eaf9901d (patch)
tree23a7704dbd9dd42ade66ffb2548270c81a4f7d50 /lldb/source/Plugins/TypeSystem
parent8262cd8a0e24fd5d3d528d675e106031d4232d8d (diff)
downloadllvm-48e09faa9457b99b927ccc0d0fbbe452eaf9901d.zip
llvm-48e09faa9457b99b927ccc0d0fbbe452eaf9901d.tar.gz
llvm-48e09faa9457b99b927ccc0d0fbbe452eaf9901d.tar.bz2
[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.
Diffstat (limited to 'lldb/source/Plugins/TypeSystem')
-rw-r--r--lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
index 24c6d90..f37652f 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
@@ -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;
};