summaryrefslogtreecommitdiffstats
path: root/lldb
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2019-10-02 12:38:04 +0000
committerRaphael Isemann <teemperor@gmail.com>2019-10-02 12:38:04 +0000
commitecbfb851a07348a16022289f18b96cfa94bd8125 (patch)
tree4be701f8883c4c4ef56ecda732a58fc11c43ccde /lldb
parent067ed96e8e5a642d671770ad8b5d109ae00eb9bc (diff)
downloadbcm5719-llvm-ecbfb851a07348a16022289f18b96cfa94bd8125.tar.gz
bcm5719-llvm-ecbfb851a07348a16022289f18b96cfa94bd8125.zip
[lldb][NFC] Remove ClangASTContext::Clear
We now only use this function directly after initialization. As Clear() resets the ASTContext back to its initial state, this is just a no-op. There are no other users for this and we no longer can set the ASTContext after construction, so Clear has no useful purpose anymore. It's also mostly copy-pasted from Finalize(). llvm-svn: 373460
Diffstat (limited to 'lldb')
-rw-r--r--lldb/include/lldb/Symbol/ClangASTContext.h2
-rw-r--r--lldb/source/Symbol/ClangASTContext.cpp13
2 files changed, 0 insertions, 15 deletions
diff --git a/lldb/include/lldb/Symbol/ClangASTContext.h b/lldb/include/lldb/Symbol/ClangASTContext.h
index f91122b6636..188635a13b8 100644
--- a/lldb/include/lldb/Symbol/ClangASTContext.h
+++ b/lldb/include/lldb/Symbol/ClangASTContext.h
@@ -111,8 +111,6 @@ public:
void setSema(clang::Sema *s);
clang::Sema *getSema() { return m_sema; }
- void Clear();
-
const char *GetTargetTriple();
void SetExternalSource(
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index 97952469ce5..30d8b1dd038 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -660,18 +660,6 @@ void ClangASTContext::Finalize() {
m_scratch_ast_source_up.reset();
}
-void ClangASTContext::Clear() {
- m_language_options_up.reset();
- m_source_manager_up.reset();
- m_diagnostics_engine_up.reset();
- m_target_options_rp.reset();
- m_target_info_up.reset();
- m_identifier_table_up.reset();
- m_selector_table_up.reset();
- m_builtins_up.reset();
- m_pointer_byte_size = 0;
-}
-
void ClangASTContext::setSema(Sema *s) {
// Ensure that the new sema actually belongs to our ASTContext.
assert(s == nullptr || &s->getASTContext() == m_ast_up.get());
@@ -683,7 +671,6 @@ const char *ClangASTContext::GetTargetTriple() {
}
void ClangASTContext::SetTargetTriple(llvm::StringRef target_triple) {
- Clear();
m_target_triple = target_triple.str();
}
OpenPOWER on IntegriCloud