diff --git a/include/llvm/CodeGen/CommandFlags.h b/include/llvm/CodeGen/CommandFlags.h index c017652b469..a019c480787 100644 --- a/include/llvm/CodeGen/CommandFlags.h +++ b/include/llvm/CodeGen/CommandFlags.h @@ -16,18 +16,16 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/Intrinsics.h" -#include "llvm/IR/Module.h" #include "llvm/MC/MCTargetOptionsCommandFlags.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Support/CodeGen.h" -#include "llvm/Support/CommandLine.h" -#include "llvm/Support/Host.h" -#include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetOptions.h" #include +#include namespace llvm { +class Module; + namespace codegen { std::string getMArch(); diff --git a/lib/CodeGen/CommandFlags.cpp b/lib/CodeGen/CommandFlags.cpp index 12fc1df8d9b..1020d22d179 100644 --- a/lib/CodeGen/CommandFlags.cpp +++ b/lib/CodeGen/CommandFlags.cpp @@ -13,6 +13,10 @@ //===----------------------------------------------------------------------===// #include "llvm/CodeGen/CommandFlags.h" +#include "llvm/IR/Module.h" +#include "llvm/MC/SubtargetFeature.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Host.h" using namespace llvm; diff --git a/tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp b/tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp index e353e333f58..4c672bc2a3b 100644 --- a/tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp +++ b/tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp @@ -21,6 +21,7 @@ #include "llvm/Support/SourceMgr.h" #include "llvm/Support/TargetRegistry.h" #include "llvm/Support/TargetSelect.h" +#include "llvm/Target/TargetMachine.h" using namespace llvm;