llvm/llvm/tools/llvm-c-test/echo.cpp

//===-- echo.cpp - tool for testing libLLVM and llvm-c API ----------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file implements the --echo command in llvm-c-test.
//
// This command uses the C API to read a module and output an exact copy of it
// as output. It is used to check that the resulting module matches the input
// to validate that the C API can read and write modules properly.
//
//===----------------------------------------------------------------------===//

#include "llvm-c-test.h"
#include "llvm-c/DebugInfo.h"
#include "llvm-c/ErrorHandling.h"
#include "llvm-c/Target.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/ErrorHandling.h"

#include <stdio.h>
#include <stdlib.h>

usingnamespacellvm;

// Provide DenseMapInfo for C API opaque types.
template<typename T>
struct CAPIDenseMap {};

// The default DenseMapInfo require to know about pointer alignment.
// Because the C API uses opaque pointer types, their alignment is unknown.
// As a result, we need to roll out our own implementation.
CAPIDenseMap<T *>;

ValueMap;
BasicBlockMap;

struct TypeCloner {};

static ValueMap clone_params(LLVMValueRef Src, LLVMValueRef Dst) {}

static void check_value_kind(LLVMValueRef V, LLVMValueKind K) {}

static LLVMValueRef clone_constant_impl(LLVMValueRef Cst, LLVMModuleRef M);

static LLVMValueRef clone_constant(LLVMValueRef Cst, LLVMModuleRef M) {}

static LLVMValueRef clone_constant_impl(LLVMValueRef Cst, LLVMModuleRef M) {}

static LLVMValueRef clone_inline_asm(LLVMValueRef Asm, LLVMModuleRef M) {}

struct FunCloner {};

static void declare_symbols(LLVMModuleRef Src, LLVMModuleRef M) {}

static void clone_symbols(LLVMModuleRef Src, LLVMModuleRef M) {}

int llvm_echo(void) {}