summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Cohen <jeffc@jolt-lang.org>2007-04-22 22:16:55 +0000
committerJeff Cohen <jeffc@jolt-lang.org>2007-04-22 22:16:55 +0000
commitdc4cb35105b00dcde3ee7c7ce0128a13da0cc927 (patch)
tree90e71d1dcdb103fe87393eb739cf2260b95724a1
parenta7f0d3ce228296d4b1b344162451f05c633e26f4 (diff)
downloadllvm-dc4cb35105b00dcde3ee7c7ce0128a13da0cc927.tar.gz
llvm-dc4cb35105b00dcde3ee7c7ce0128a13da0cc927.tar.bz2
llvm-dc4cb35105b00dcde3ee7c7ce0128a13da0cc927.tar.xz
Have compiler enforce this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36353 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/AbstractTypeUser.h8
-rw-r--r--lib/VMCore/Type.cpp1
2 files changed, 5 insertions, 4 deletions
diff --git a/include/llvm/AbstractTypeUser.h b/include/llvm/AbstractTypeUser.h
index ee3fde033e..fa1e8b15b8 100644
--- a/include/llvm/AbstractTypeUser.h
+++ b/include/llvm/AbstractTypeUser.h
@@ -14,9 +14,11 @@
#ifndef LLVM_ABSTRACT_TYPE_USER_H
#define LLVM_ABSTRACT_TYPE_USER_H
-// IMPORTANT: Do not include this file directly. Include Type.h instead.
-// Some versions of GCC can't handle the inlined method PATypeHolder::dropRef()
-// correctly otherwise.
+#if !defined(LLVM_TYPE_H) && !defined(LLVM_VALUE_H)
+#error Do not include this file directly. Include Type.h instead.
+#error Some versions of GCC (e.g. 3.4 and 4.1) can't handle the inlined method
+#error PATypeHolder::dropRef() correctly otherwise.
+#endif
// This is the "master" include for <cassert> Whether this file needs it or not,
// it must always include <cassert> for the files which include
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp
index 3e5b7eb491..3463e38389 100644
--- a/lib/VMCore/Type.cpp
+++ b/lib/VMCore/Type.cpp
@@ -11,7 +11,6 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/AbstractTypeUser.h"
#include "llvm/DerivedTypes.h"
#include "llvm/ParameterAttributes.h"
#include "llvm/Constants.h"