aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-06-20 09:53:52 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-06-20 09:53:52 +0000
commitf95d4125c01fa7b98722ae8cfbceac4a87d037b4 (patch)
tree5d3f7163adeadbff7ac65afff4414f6757b06792 /lib
parent10663399b1d4663e8b140eb12d9aa351be147c55 (diff)
Fix a big layering violation introduced by r158771.
That commit added a new library just to hold the RawCommentList. I've started a discussion on the commit thread about whether that is really meritted -- it certainly doesn't seem necessary at this stage. However, the immediate problem is that the AST library has a hard dependency on the Comment library, but the dependencies were set up completely backward. In addition to the layering violation, this had an unfortunate effect if scattering the Comments library dependency throughout the build system, but inconsistently so -- several parts of the CMake dependencies were missing and only showed up due to transitive deps or the fact that the target wasn't being built by tho bots. It turns out that the Comments library can't (currently) be a well formed layer *below* the AST library either, as it has an API that accepts an ASTContext. That parameter is currently unused, so maybe that was a mistake? Anyways, it really seems like this is logically part of the AST -- that's the whole point of the ASTContext providing access to it as far as I can tell -- so I've merged it into the AST library to solve the immediate layering violation problems and remove some of the churn from our library dependencies. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158807 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/CMakeLists.txt1
-rw-r--r--lib/AST/RawCommentList.cpp (renamed from lib/Comments/RawCommentList.cpp)2
-rw-r--r--lib/CMakeLists.txt1
-rw-r--r--lib/Comments/CMakeLists.txt6
-rw-r--r--lib/Comments/Makefile14
-rwxr-xr-xlib/Makefile2
-rw-r--r--lib/Sema/CMakeLists.txt1
7 files changed, 3 insertions, 24 deletions
diff --git a/lib/AST/CMakeLists.txt b/lib/AST/CMakeLists.txt
index 716459a930..6780944665 100644
--- a/lib/AST/CMakeLists.txt
+++ b/lib/AST/CMakeLists.txt
@@ -35,6 +35,7 @@ add_clang_library(clangAST
NestedNameSpecifier.cpp
NSAPI.cpp
ParentMap.cpp
+ RawCommentList.cpp
RecordLayout.cpp
RecordLayoutBuilder.cpp
SelectorLocationsKind.cpp
diff --git a/lib/Comments/RawCommentList.cpp b/lib/AST/RawCommentList.cpp
index 7db9175c17..07776779e8 100644
--- a/lib/Comments/RawCommentList.cpp
+++ b/lib/AST/RawCommentList.cpp
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Comments/RawCommentList.h"
+#include "clang/AST/RawCommentList.h"
#include "clang/AST/ASTContext.h"
#include "llvm/ADT/STLExtras.h"
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 228b43b235..dfb9d61ff5 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -15,4 +15,3 @@ add_subdirectory(Frontend)
add_subdirectory(FrontendTool)
add_subdirectory(Tooling)
add_subdirectory(StaticAnalyzer)
-add_subdirectory(Comments)
diff --git a/lib/Comments/CMakeLists.txt b/lib/Comments/CMakeLists.txt
deleted file mode 100644
index db4ca73d2b..0000000000
--- a/lib/Comments/CMakeLists.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-set(LLVM_USED_LIBS clangBasic clangAST clangLex)
-
-add_clang_library(clangComments
- RawCommentList.cpp
- )
-
diff --git a/lib/Comments/Makefile b/lib/Comments/Makefile
deleted file mode 100644
index 0783f1f26c..0000000000
--- a/lib/Comments/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-##===- clang/lib/Comments/Makefile -------------------------*- Makefile -*-===##
-#
-# The LLVM Compiler Infrastructure
-#
-# This file is distributed under the University of Illinois Open Source
-# License. See LICENSE.TXT for details.
-#
-##===----------------------------------------------------------------------===##
-
-CLANG_LEVEL := ../..
-LIBRARYNAME := clangComments
-
-include $(CLANG_LEVEL)/Makefile
-
diff --git a/lib/Makefile b/lib/Makefile
index 0e81af19ce..2eb72a91e6 100755
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -10,7 +10,7 @@ CLANG_LEVEL := ..
PARALLEL_DIRS = Headers Basic Lex Parse AST Sema CodeGen Analysis \
StaticAnalyzer Edit Rewrite ARCMigrate Serialization Frontend \
- FrontendTool Tooling Driver Comments
+ FrontendTool Tooling Driver
include $(CLANG_LEVEL)/Makefile
diff --git a/lib/Sema/CMakeLists.txt b/lib/Sema/CMakeLists.txt
index 3a898dde23..07734c7c7b 100644
--- a/lib/Sema/CMakeLists.txt
+++ b/lib/Sema/CMakeLists.txt
@@ -4,7 +4,6 @@ set(LLVM_USED_LIBS
clangBasic
clangEdit
clangLex
- clangComments
)
add_clang_library(clangSema