Remove MCAsmInfo.h include from TargetOptions.h
authorReid Kleckner <rnk@google.com>
Wed, 27 Jul 2016 16:03:57 +0000 (16:03 +0000)
committerReid Kleckner <rnk@google.com>
Wed, 27 Jul 2016 16:03:57 +0000 (16:03 +0000)
TargetOptions wants the ExceptionHandling enum. Move that to
MCTargetOptions.h to avoid transitively including Dwarf.h everywhere in
clang. Now you can add a DWARF tag without a full rebuild of clang
semantic analysis.

llvm-svn: 276883

llvm/include/llvm/CodeGen/MachineModuleInfo.h
llvm/include/llvm/MC/MCAsmBackend.h
llvm/include/llvm/MC/MCAsmInfo.h
llvm/include/llvm/MC/MCTargetOptions.h
llvm/include/llvm/Target/TargetOptions.h
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp

index 7757112..f095876 100644 (file)
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/Analysis/EHPersonalities.h"
 #include "llvm/IR/DebugLoc.h"
-#include "llvm/IR/Metadata.h"
 #include "llvm/IR/ValueHandle.h"
 #include "llvm/MC/MCContext.h"
 #include "llvm/MC/MCSymbol.h"
 #include "llvm/MC/MachineLocation.h"
 #include "llvm/Pass.h"
 #include "llvm/Support/DataTypes.h"
-#include "llvm/Support/Dwarf.h"
 
 namespace llvm {
 
index ce17a2a..d4bdbcd 100644 (file)
@@ -13,7 +13,6 @@
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/Optional.h"
 #include "llvm/MC/MCDirectives.h"
-#include "llvm/MC/MCDwarf.h"
 #include "llvm/MC/MCFixup.h"
 #include "llvm/Support/DataTypes.h"
 #include "llvm/Support/ErrorHandling.h"
@@ -21,6 +20,7 @@
 namespace llvm {
 class MCAsmLayout;
 class MCAssembler;
+class MCCFIInstruction;
 class MCELFObjectTargetWriter;
 struct MCFixupKindInfo;
 class MCFragment;
@@ -28,6 +28,7 @@ class MCInst;
 class MCRelaxableFragment;
 class MCObjectWriter;
 class MCSection;
+class MCSubtargetInfo;
 class MCValue;
 class raw_pwrite_stream;
 
index e6ed568..a493e82 100644 (file)
@@ -18,6 +18,7 @@
 
 #include "llvm/MC/MCDirectives.h"
 #include "llvm/MC/MCDwarf.h"
+#include "llvm/MC/MCTargetOptions.h"
 #include <cassert>
 #include <vector>
 
@@ -41,14 +42,6 @@ enum class EncodingType {
 };
 }
 
-enum class ExceptionHandling {
-  None,     /// No exception support
-  DwarfCFI, /// DWARF-like instruction based exceptions
-  SjLj,     /// setjmp/longjmp based exceptions
-  ARM,      /// ARM EHABI
-  WinEH,    /// Windows Exception Handling
-};
-
 namespace LCOMM {
 enum LCOMMType { NoAlignment, ByteAlignment, Log2Alignment };
 }
index 1d170b7..fd4c6e4 100644 (file)
 
 namespace llvm {
 
+enum class ExceptionHandling {
+  None,     /// No exception support
+  DwarfCFI, /// DWARF-like instruction based exceptions
+  SjLj,     /// setjmp/longjmp based exceptions
+  ARM,      /// ARM EHABI
+  WinEH,    /// Windows Exception Handling
+};
+
 class StringRef;
 
 class MCTargetOptions {
index 57873b4..b1e938e 100644 (file)
@@ -17,7 +17,6 @@
 
 #include "llvm/Target/TargetRecip.h"
 #include "llvm/MC/MCTargetOptions.h"
-#include "llvm/MC/MCAsmInfo.h"
 
 namespace llvm {
   class MachineFunction;
index 10c76e7..e639d0e 100644 (file)
@@ -25,6 +25,7 @@
 #include "llvm/DebugInfo/Msf/ByteStream.h"
 #include "llvm/DebugInfo/Msf/StreamReader.h"
 #include "llvm/IR/Constants.h"
+#include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCExpr.h"
 #include "llvm/MC/MCSectionCOFF.h"
 #include "llvm/MC/MCSymbol.h"
index 1071cf8..2fa229c 100644 (file)
@@ -59,6 +59,7 @@
 #include "llvm/CodeGen/MachineInstrBuilder.h"
 #include "llvm/CodeGen/MachineRegisterInfo.h"
 #include "llvm/IR/Constants.h"
+#include "llvm/MC/MCAsmInfo.h"
 
 using namespace llvm;