diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-05-17 00:24:14 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-05-17 00:24:14 +0000 |
commit | bd2320f5d1153f2623f3104ea78e2cc5dbae6afb (patch) | |
tree | fd6fcd52c5bd30362b10fd32740c2e328d92cf9f /include/clang/Basic/LangOptions.h | |
parent | 90199139dcd767a3bfc488590a8b27145bce7766 (diff) |
[modules] When creating a declaration, cache its owning module immediately
rather than waiting until it's queried.
Currently this is only applied to local submodule visibility mode, as we don't
yet allocate storage for the owning module in non-local-visibility modules
compilations.
This reinstates r302965, reverted in r303037, with a fix for the reported
crash, which occurred when reparenting a local declaration to be a child of
a hidden imported declaration (specifically during template instantiation).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303224 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/LangOptions.h')
-rw-r--r-- | include/clang/Basic/LangOptions.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/clang/Basic/LangOptions.h b/include/clang/Basic/LangOptions.h index 20a0e58456..ceaedf5857 100644 --- a/include/clang/Basic/LangOptions.h +++ b/include/clang/Basic/LangOptions.h @@ -166,6 +166,11 @@ public: return getCompilingModule() != CMK_None; } + /// Do we need to track the owning module for a local declaration? + bool trackLocalOwningModule() const { + return ModulesLocalVisibility; + } + bool isSignedOverflowDefined() const { return getSignedOverflowBehavior() == SOB_Defined; } |