//===-- Writer.cpp - Library for converting LLVM code to C ----------------===//// // The LLVM Compiler Infrastructure//// This file was developed by the LLVM research group and is distributed under// the University of Illinois Open Source License. See LICENSE.TXT for details.// //===----------------------------------------------------------------------===////// This library converts LLVM code to C code, compilable by GCC and other C// compilers.////===----------------------------------------------------------------------===//#include"CTargetMachine.h"#include"llvm/Target/TargetMachineImpls.h"#include"llvm/Constants.h"#include"llvm/DerivedTypes.h"#include"llvm/Module.h"#include"llvm/Instructions.h"#include"llvm/Pass.h"#include"llvm/PassManager.h"#include"llvm/SymbolTable.h"#include"llvm/Intrinsics.h"#include"llvm/IntrinsicLowering.h"#include"llvm/Analysis/FindUsedTypes.h"#include"llvm/Analysis/ConstantsScanner.h"#include"llvm/Transforms/Scalar.h"#include"llvm/Support/CallSite.h"#include"llvm/Support/CFG.h"#include"llvm/Support/GetElementPtrTypeIterator.h"#include"llvm/Support/InstVisitor.h"#include"llvm/Support/Mangler.h"#include"Support/StringExtras.h"#include"Config/config.h"#include<algorithm>#include<sstream>usingnamespacellvm;namespace{/// NameAllUsedStructs - This pass inserts names for any unnamed structure/// types that are used by the program.///classCBackendNameAllUsedStructs