diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2014-03-06 04:13:12 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2014-03-06 04:13:12 +0000 |
commit | 7c00d1860701e30d374295890be96f3ec43da82f (patch) | |
tree | c986af18bf4779cb01b4ba768312bc21a95b464b /include/llvm/Support | |
parent | ca7680b9987f329ecd9a5022f61b7b88272f8879 (diff) | |
download | llvm-7c00d1860701e30d374295890be96f3ec43da82f.tar.gz llvm-7c00d1860701e30d374295890be96f3ec43da82f.tar.bz2 llvm-7c00d1860701e30d374295890be96f3ec43da82f.tar.xz |
[Modules] Fix a layering issue that is actually impacting the modules
selfhost.
The 'Core.h' C-API header is part of the IR LLVM library. (One might
even argue it should be called IR.h, but that's a separate point.) We
can't include it into a Support header without violating the layering,
and in a way that breaks modules. MemoryBuffer's opaque C type was being
defined in the Core.h C-API header despite being in the Support library,
and thus we ended up with this weird issue.
It turns out that there were other constructs from the Support library
in the Core.h header. This patch lifts all of them into Support.h and
then includes that into Core.h.
The only possible fallout is if someone was including Support.h and
relying on Core.h to be visible for their own uses. Considering the
narrow interface actually provided by the C-API for the Support library,
this seems a very, very unlikely mistake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203071 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r-- | include/llvm/Support/MemoryBuffer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Support/MemoryBuffer.h b/include/llvm/Support/MemoryBuffer.h index 1910d44240..578c7e8eb8 100644 --- a/include/llvm/Support/MemoryBuffer.h +++ b/include/llvm/Support/MemoryBuffer.h @@ -14,7 +14,7 @@ #ifndef LLVM_SUPPORT_MEMORYBUFFER_H #define LLVM_SUPPORT_MEMORYBUFFER_H -#include "llvm-c/Core.h" +#include "llvm-c/Support.h" #include "llvm/ADT/Twine.h" #include "llvm/Support/CBindingWrapping.h" #include "llvm/Support/Compiler.h" |