[PATCH] D27757: [lld] Remove unnecessary llvm/Config/config.h includes

Michał Górny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 14 08:25:48 PST 2016


mgorny created this revision.
mgorny added reviewers: ruiu, kledzik, pcc, beanz.
mgorny added a subscriber: llvm-commits.
mgorny added a project: lld.

Remove the includes of <llvm/Config/config.h> private LLVM header.
The relevant files seem not to use any definitions from that file,
and it is not available when building against installed LLVM.

The use in lib/ReaderWriter/MachO/MachOLinkingContext.cpp originates
from https://reviews.llvm.org/rL218718, and the use in ELF/Strings.cpp from https://reviews.llvm.org/rL274804 (where it
was moved from Symbols.cpp). In both cases, they were added as a part of
demangling support, and they provided HAVE_CXXABI_H.

Since we are now using the LLVM demangler library instead, the code was
removed and the includes and no longer necessary.


https://reviews.llvm.org/D27757

Files:
  ELF/Strings.cpp
  lib/ReaderWriter/MachO/MachOLinkingContext.cpp


Index: lib/ReaderWriter/MachO/MachOLinkingContext.cpp
===================================================================
--- lib/ReaderWriter/MachO/MachOLinkingContext.cpp
+++ lib/ReaderWriter/MachO/MachOLinkingContext.cpp
@@ -22,7 +22,6 @@
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/ADT/Triple.h"
-#include "llvm/Config/config.h"
 #include "llvm/Demangle/Demangle.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/Errc.h"
Index: ELF/Strings.cpp
===================================================================
--- ELF/Strings.cpp
+++ ELF/Strings.cpp
@@ -13,7 +13,6 @@
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/Twine.h"
-#include "llvm/Config/config.h"
 #include "llvm/Demangle/Demangle.h"
 #include <algorithm>
 #include <cstring>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27757.81384.patch
Type: text/x-patch
Size: 831 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161214/8bb3acbb/attachment.bin>


More information about the llvm-commits mailing list