Move CodeGenFileType enum to Support/CodeGen.h
Avoids the need to include TargetMachine.h from various places just for
an enum. Various other enums live here, such as the optimization level,
TLS model, etc. Data suggests that this change probably doesn't matter,
but it seems nice to have anyway.
diff --git a/llvm/lib/Target/TargetMachineC.cpp b/llvm/lib/Target/TargetMachineC.cpp
index 3ac9c38..a38633e 100644
--- a/llvm/lib/Target/TargetMachineC.cpp
+++ b/llvm/lib/Target/TargetMachineC.cpp
@@ -195,13 +195,13 @@
Mod->setDataLayout(TM->createDataLayout());
- TargetMachine::CodeGenFileType ft;
+ CodeGenFileType ft;
switch (codegen) {
case LLVMAssemblyFile:
- ft = TargetMachine::CGFT_AssemblyFile;
+ ft = CGFT_AssemblyFile;
break;
default:
- ft = TargetMachine::CGFT_ObjectFile;
+ ft = CGFT_ObjectFile;
break;
}
if (TM->addPassesToEmitFile(pass, OS, nullptr, ft)) {