diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h
index 6f486512e54..c567895594b 100644
--- a/include/llvm/ADT/FoldingSet.h
+++ b/include/llvm/ADT/FoldingSet.h
@@ -18,10 +18,10 @@
 
 #include "llvm/Support/DataTypes.h"
 #include "llvm/ADT/SmallVector.h"
-#include "llvm/ADT/APFloat.h"
 #include <string>
 
 namespace llvm {
+  class APFloat;
 
 /// This folding set used for two purposes:
 ///   1. Given information about a node we want to create, look up the unique
diff --git a/lib/Support/FoldingSet.cpp b/lib/Support/FoldingSet.cpp
index d099d90fe24..059b780565b 100644
--- a/lib/Support/FoldingSet.cpp
+++ b/lib/Support/FoldingSet.cpp
@@ -15,6 +15,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/ADT/FoldingSet.h"
+#include "llvm/ADT/APFloat.h"
 #include "llvm/Support/MathExtras.h"
 #include <cassert>
 using namespace llvm;