[llvm] 70d77b5 - Magic.h - reduce includes to forward declarations. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 9 03:55:05 PDT 2020
Author: Simon Pilgrim
Date: 2020-06-09T11:54:51+01:00
New Revision: 70d77b5f8b1be87c10bda1b0f25728114ba228a7
URL: https://github.com/llvm/llvm-project/commit/70d77b5f8b1be87c10bda1b0f25728114ba228a7
DIFF: https://github.com/llvm/llvm-project/commit/70d77b5f8b1be87c10bda1b0f25728114ba228a7.diff
LOG: Magic.h - reduce includes to forward declarations. NFC.
Added:
Modified:
llvm/include/llvm/BinaryFormat/Magic.h
llvm/lib/BinaryFormat/Magic.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/BinaryFormat/Magic.h b/llvm/include/llvm/BinaryFormat/Magic.h
index 64c687262f4a..78227ddbe095 100644
--- a/llvm/include/llvm/BinaryFormat/Magic.h
+++ b/llvm/include/llvm/BinaryFormat/Magic.h
@@ -9,12 +9,12 @@
#ifndef LLVM_BINARYFORMAT_MAGIC_H
#define LLVM_BINARYFORMAT_MAGIC_H
-#include "llvm/ADT/StringRef.h"
-#include "llvm/ADT/Twine.h"
-
#include <system_error>
namespace llvm {
+class StringRef;
+class Twine;
+
/// file_magic - An "enum class" enumeration of file types based on magic (the
/// first N bytes of the file).
struct file_magic {
diff --git a/llvm/lib/BinaryFormat/Magic.cpp b/llvm/lib/BinaryFormat/Magic.cpp
index bbcbbabededb..61b1504e59b0 100644
--- a/llvm/lib/BinaryFormat/Magic.cpp
+++ b/llvm/lib/BinaryFormat/Magic.cpp
@@ -7,7 +7,8 @@
//===----------------------------------------------------------------------===//
#include "llvm/BinaryFormat/Magic.h"
-
+#include "llvm/ADT/StringRef.h"
+#include "llvm/ADT/Twine.h"
#include "llvm/BinaryFormat/COFF.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/BinaryFormat/MachO.h"
More information about the llvm-commits
mailing list