diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-05-17 20:22:49 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-05-17 20:22:49 +0000 |
commit | 1ce08792766261dcaa25d8215f9d1c2f70d7b7e9 (patch) | |
tree | 4022bfb5dc1b2e6f7fc5c337048e370656cc2260 /include | |
parent | 2410013d9382b8129702fa3a3bf19a370ae7afc3 (diff) |
Notes
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/AST/Decl.h | 10 | ||||
-rw-r--r-- | include/clang/AST/DeclBase.h | 14 | ||||
-rw-r--r-- | include/clang/Basic/LangOptions.h | 5 | ||||
-rw-r--r-- | include/clang/Basic/SourceManager.h | 2 | ||||
-rw-r--r-- | include/clang/Frontend/ASTUnit.h | 6 | ||||
-rw-r--r-- | include/clang/Sema/Sema.h | 4 |
6 files changed, 21 insertions, 20 deletions
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index facef8e55f7aa..4f8042ac92918 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -301,16 +301,6 @@ public: using Decl::isModulePrivate; using Decl::setModulePrivate; - /// \brief Determine whether this declaration is hidden from name lookup. - bool isHidden() const { return Hidden; } - - /// \brief Set whether this declaration is hidden from name lookup. - void setHidden(bool Hide) { - assert((!Hide || isFromASTFile() || hasLocalOwningModuleStorage()) && - "declaration with no owning module can't be hidden"); - Hidden = Hide; - } - /// \brief Determine whether this declaration is a C++ class member. bool isCXXClassMember() const { const DeclContext *DC = getDeclContext(); diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h index 15ac11a5a7770..08879b36cce54 100644 --- a/include/clang/AST/DeclBase.h +++ b/include/clang/AST/DeclBase.h @@ -706,6 +706,20 @@ public: reinterpret_cast<Module **>(this)[-1] = M; } + Module *getOwningModule() const { + return isFromASTFile() ? getImportedOwningModule() : getLocalOwningModule(); + } + + /// \brief Determine whether this declaration is hidden from name lookup. + bool isHidden() const { return Hidden; } + + /// \brief Set whether this declaration is hidden from name lookup. + void setHidden(bool Hide) { + assert((!Hide || isFromASTFile() || hasLocalOwningModuleStorage()) && + "declaration with no owning module can't be hidden"); + Hidden = Hide; + } + unsigned getIdentifierNamespace() const { return IdentifierNamespace; } diff --git a/include/clang/Basic/LangOptions.h b/include/clang/Basic/LangOptions.h index 20a0e58456020..ceaedf58574fd 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; } diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index c8fe2ab90c292..6960ea690b91c 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -865,7 +865,7 @@ public: const FileEntry *NewFile); /// \brief Returns true if the file contents have been overridden. - bool isFileOverridden(const FileEntry *File) { + bool isFileOverridden(const FileEntry *File) const { if (OverriddenFilesInfo) { if (OverriddenFilesInfo->OverriddenFilesWithBuffer.count(File)) return true; diff --git a/include/clang/Frontend/ASTUnit.h b/include/clang/Frontend/ASTUnit.h index 2a8df1b7b9aeb..46395cf6e8612 100644 --- a/include/clang/Frontend/ASTUnit.h +++ b/include/clang/Frontend/ASTUnit.h @@ -419,7 +419,6 @@ private: explicit ASTUnit(bool MainFileIsAST); - void CleanTemporaryFiles(); bool Parse(std::shared_ptr<PCHContainerOperations> PCHContainerOps, std::unique_ptr<llvm::MemoryBuffer> OverrideMainBuffer); @@ -530,11 +529,6 @@ public: ASTMutationListener *getASTMutationListener(); ASTDeserializationListener *getDeserializationListener(); - /// \brief Add a temporary file that the ASTUnit depends on. - /// - /// This file will be erased when the ASTUnit is destroyed. - void addTemporaryFile(StringRef TempFile); - bool getOnlyLocalDecls() const { return OnlyLocalDecls; } bool getOwnsRemappedFileBuffers() const { return OwnsRemappedFileBuffers; } diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index e910be14f9696..ba2da92c5be18 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -1467,11 +1467,9 @@ private: VisibleModuleSet VisibleModules; - Module *CachedFakeTopLevelModule; - public: /// \brief Get the module owning an entity. - Module *getOwningModule(Decl *Entity); + Module *getOwningModule(Decl *Entity) { return Entity->getOwningModule(); } /// \brief Make a merged definition of an existing hidden definition \p ND /// visible at the specified location. |