aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--include/clang/AST/ASTContext.h2
-rw-r--r--include/clang/AST/RawCommentList.h (renamed from include/clang/Comments/RawCommentList.h)0
-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
-rw-r--r--tools/arcmt-test/Makefile2
-rw-r--r--tools/c-index-test/Makefile2
-rw-r--r--tools/clang-check/CMakeLists.txt2
-rw-r--r--tools/clang-check/Makefile2
-rw-r--r--tools/diagtool/Makefile2
-rw-r--r--tools/driver/Makefile2
-rw-r--r--tools/libclang/CMakeLists.txt1
-rw-r--r--tools/libclang/Makefile2
-rw-r--r--unittests/Frontend/Makefile2
-rw-r--r--unittests/Tooling/Makefile2
19 files changed, 13 insertions, 35 deletions
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h
index 172ac88edf..cc2d98736f 100644
--- a/include/clang/AST/ASTContext.h
+++ b/include/clang/AST/ASTContext.h
@@ -27,7 +27,7 @@
#include "clang/AST/TemplateName.h"
#include "clang/AST/Type.h"
#include "clang/AST/CanonicalType.h"
-#include "clang/Comments/RawCommentList.h"
+#include "clang/AST/RawCommentList.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
diff --git a/include/clang/Comments/RawCommentList.h b/include/clang/AST/RawCommentList.h
index bf0b616383..bf0b616383 100644
--- a/include/clang/Comments/RawCommentList.h
+++ b/include/clang/AST/RawCommentList.h
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
diff --git a/tools/arcmt-test/Makefile b/tools/arcmt-test/Makefile
index 81f27c2b11..84c4dc2b66 100644
--- a/tools/arcmt-test/Makefile
+++ b/tools/arcmt-test/Makefile
@@ -19,7 +19,7 @@ NO_INSTALL = 1
LINK_COMPONENTS := support mc
USEDLIBS = clangARCMigrate.a clangRewrite.a \
clangFrontend.a clangDriver.a clangSerialization.a clangParse.a \
- clangSema.a clangEdit.a clangAnalysis.a clangAST.a clangLex.a clangComments.a \
+ clangSema.a clangEdit.a clangAnalysis.a clangAST.a clangLex.a \
clangBasic.a
include $(CLANG_LEVEL)/Makefile
diff --git a/tools/c-index-test/Makefile b/tools/c-index-test/Makefile
index b061492caf..35f2c040c6 100644
--- a/tools/c-index-test/Makefile
+++ b/tools/c-index-test/Makefile
@@ -20,7 +20,7 @@ TOOL_NO_EXPORTS = 1
LINK_COMPONENTS := support mc
USEDLIBS = clang.a clangFrontend.a clangDriver.a \
clangSerialization.a clangParse.a clangSema.a \
- clangAnalysis.a clangEdit.a clangAST.a clangLex.a clangComments.a \
+ clangAnalysis.a clangEdit.a clangAST.a clangLex.a \
clangBasic.a
include $(CLANG_LEVEL)/Makefile
diff --git a/tools/clang-check/CMakeLists.txt b/tools/clang-check/CMakeLists.txt
index 83fe10f80e..851d6cdd16 100644
--- a/tools/clang-check/CMakeLists.txt
+++ b/tools/clang-check/CMakeLists.txt
@@ -1,4 +1,4 @@
-set(LLVM_USED_LIBS clangTooling clangBasic clangComments)
+set(LLVM_USED_LIBS clangTooling clangBasic)
add_clang_executable(clang-check
ClangCheck.cpp
diff --git a/tools/clang-check/Makefile b/tools/clang-check/Makefile
index 5c54a6b332..49b1ada95b 100644
--- a/tools/clang-check/Makefile
+++ b/tools/clang-check/Makefile
@@ -18,7 +18,7 @@ TOOL_NO_EXPORTS = 1
LINK_COMPONENTS := support mc
USEDLIBS = clangFrontend.a clangSerialization.a clangDriver.a \
clangTooling.a clangParse.a clangSema.a clangAnalysis.a \
- clangEdit.a clangAST.a clangLex.a clangComments.a clangBasic.a
+ clangEdit.a clangAST.a clangLex.a clangBasic.a
include $(CLANG_LEVEL)/Makefile
diff --git a/tools/diagtool/Makefile b/tools/diagtool/Makefile
index 5f5fb2ae36..8af4cef643 100644
--- a/tools/diagtool/Makefile
+++ b/tools/diagtool/Makefile
@@ -20,7 +20,7 @@ LINK_COMPONENTS := support mc
USEDLIBS = clangFrontend.a clangDriver.a clangSerialization.a clangParse.a \
clangSema.a clangAnalysis.a clangEdit.a clangAST.a clangLex.a \
- clangComments.a clangBasic.a
+ clangBasic.a
include $(CLANG_LEVEL)/Makefile
diff --git a/tools/driver/Makefile b/tools/driver/Makefile
index 4105cb6d94..270d4fdda8 100644
--- a/tools/driver/Makefile
+++ b/tools/driver/Makefile
@@ -36,7 +36,7 @@ USEDLIBS = clangFrontendTool.a clangFrontend.a clangDriver.a \
clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a \
clangStaticAnalyzerCore.a \
clangAnalysis.a clangARCMigrate.a clangRewrite.a \
- clangEdit.a clangAST.a clangLex.a clangComments.a clangBasic.a
+ clangEdit.a clangAST.a clangLex.a clangBasic.a
include $(CLANG_LEVEL)/Makefile
diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt
index 7a6732a77a..293dfa3ff9 100644
--- a/tools/libclang/CMakeLists.txt
+++ b/tools/libclang/CMakeLists.txt
@@ -6,7 +6,6 @@ set(LLVM_USED_LIBS
clangSerialization
clangSema
clangEdit
- clangComments
clangAST
clangLex
clangBasic)
diff --git a/tools/libclang/Makefile b/tools/libclang/Makefile
index 78da0675dc..8d0a614403 100644
--- a/tools/libclang/Makefile
+++ b/tools/libclang/Makefile
@@ -19,7 +19,7 @@ LINK_COMPONENTS := support mc
USEDLIBS = clangARCMigrate.a clangRewrite.a clangFrontend.a clangDriver.a \
clangSerialization.a \
clangParse.a clangSema.a clangEdit.a clangAnalysis.a \
- clangAST.a clangLex.a clangComments.a clangBasic.a
+ clangAST.a clangLex.a clangBasic.a
include $(CLANG_LEVEL)/Makefile
diff --git a/unittests/Frontend/Makefile b/unittests/Frontend/Makefile
index 357e24234f..f3e6396658 100644
--- a/unittests/Frontend/Makefile
+++ b/unittests/Frontend/Makefile
@@ -14,6 +14,6 @@ USEDLIBS = clangFrontendTool.a clangFrontend.a clangDriver.a \
clangSerialization.a clangCodeGen.a clangParse.a clangSema.a \
clangStaticAnalyzerCheckers.a clangStaticAnalyzerCore.a \
clangARCMigrate.a clangRewrite.a clangEdit.a \
- clangAnalysis.a clangAST.a clangLex.a clangComments.a clangBasic.a
+ clangAnalysis.a clangAST.a clangLex.a clangBasic.a
include $(CLANG_LEVEL)/unittests/Makefile
diff --git a/unittests/Tooling/Makefile b/unittests/Tooling/Makefile
index 84e05bb0e4..5d6747dce8 100644
--- a/unittests/Tooling/Makefile
+++ b/unittests/Tooling/Makefile
@@ -12,6 +12,6 @@ TESTNAME = Tooling
LINK_COMPONENTS := support mc
USEDLIBS = clangTooling.a clangFrontend.a clangSerialization.a clangDriver.a \
clangParse.a clangRewrite.a clangSema.a clangAnalysis.a clangEdit.a \
- clangAST.a clangLex.a clangComments.a clangBasic.a
+ clangAST.a clangLex.a clangBasic.a
include $(CLANG_LEVEL)/unittests/Makefile