#include "TestCompiler.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/GlobalDecl.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/CodeGen/CodeGenABITypes.h"
#include "clang/CodeGen/ModuleBuilder.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Parse/ParseAST.h"
#include "clang/Sema/Sema.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/TargetParser/Host.h"
#include "llvm/TargetParser/Triple.h"
#include "gtest/gtest.h"
usingnamespacellvm;
usingnamespaceclang;
namespace {
static const bool DebugThisTest = …;
struct MyASTConsumer;
static void test_codegen_fns(MyASTConsumer *my);
static bool test_codegen_fns_ran;
struct MyASTConsumer : public ASTConsumer { … };
void MyASTConsumer::Initialize(ASTContext &Context) { … }
bool MyASTConsumer::HandleTopLevelDecl(DeclGroupRef DG) { … }
void MyASTConsumer::HandleInlineFunctionDefinition(FunctionDecl *D) { … }
void MyASTConsumer::HandleInterestingDecl(DeclGroupRef D) { … }
void MyASTConsumer::HandleTranslationUnit(ASTContext &Context) { … }
void MyASTConsumer::HandleTagDeclDefinition(TagDecl *D) { … }
void MyASTConsumer::HandleTagDeclRequiredDefinition(const TagDecl *D) { … }
void MyASTConsumer::HandleCXXImplicitFunctionInstantiation(FunctionDecl *D) { … }
void MyASTConsumer::HandleTopLevelDeclInObjCContainer(DeclGroupRef D) { … }
void MyASTConsumer::HandleImplicitImportDecl(ImportDecl *D) { … }
void MyASTConsumer::CompleteTentativeDefinition(VarDecl *D) { … }
void MyASTConsumer::AssignInheritanceModel(CXXRecordDecl *RD) { … }
void MyASTConsumer::HandleCXXStaticMemberVarInstantiation(VarDecl *VD) { … }
void MyASTConsumer::HandleVTable(CXXRecordDecl *RD) { … }
ASTMutationListener *MyASTConsumer::GetASTMutationListener() { … }
ASTDeserializationListener *MyASTConsumer::GetASTDeserializationListener() { … }
void MyASTConsumer::PrintStats() { … }
bool MyASTConsumer::shouldSkipFunctionBody(Decl *D) { … }
const char TestProgram[] = …;
static void test_codegen_fns(MyASTConsumer *my) { … }
TEST(CodeGenExternalTest, CodeGenExternalTest) { … }
}