[llvm] r318602 - Fix use of config.h in public headers.

Eric Fiselier via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 18 14:42:26 PST 2017


Author: ericwf
Date: Sat Nov 18 14:42:26 2017
New Revision: 318602

URL: http://llvm.org/viewvc/llvm-project?rev=318602&view=rev
Log:
Fix use of config.h in public headers.

The CodeGenCoverage.h header is installed, but it references
the build-only header "llvm/Config/config.h". This breaks use
of the CodeGenCoverage.h header once it is installed, because config.h isn't
available.

This patch fixes the error by moving the config.h include from
the CodeGenCoverage.h header (where it's not needed), to the
CodeGenCoverage.cpp source file.

Modified:
    llvm/trunk/include/llvm/Support/CodeGenCoverage.h
    llvm/trunk/lib/Support/CodeGenCoverage.cpp

Modified: llvm/trunk/include/llvm/Support/CodeGenCoverage.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CodeGenCoverage.h?rev=318602&r1=318601&r2=318602&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/CodeGenCoverage.h (original)
+++ llvm/trunk/include/llvm/Support/CodeGenCoverage.h Sat Nov 18 14:42:26 2017
@@ -13,7 +13,6 @@
 #define LLVM_SUPPORT_CODEGENCOVERAGE_H
 
 #include "llvm/ADT/BitVector.h"
-#include "llvm/Config/config.h"
 
 namespace llvm {
 class LLVMContext;

Modified: llvm/trunk/lib/Support/CodeGenCoverage.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CodeGenCoverage.cpp?rev=318602&r1=318601&r2=318602&view=diff
==============================================================================
--- llvm/trunk/lib/Support/CodeGenCoverage.cpp (original)
+++ llvm/trunk/lib/Support/CodeGenCoverage.cpp Sat Nov 18 14:42:26 2017
@@ -12,6 +12,7 @@
 
 #include "llvm/Support/CodeGenCoverage.h"
 
+#include "llvm/Config/config.h"
 #include "llvm/Support/Endian.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/MemoryBuffer.h"




More information about the llvm-commits mailing list