mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 00:17:01 +00:00
Introduce new headers whose inclusion forces linking and
initialization of all targets (InitializeAllTargets.h) or assembler printers (InitializeAllAsmPrinters.h). This is a step toward the elimination of relinked object files, so that we can build normal archives. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73543 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
34
include/llvm/InitializeAllTargets.h
Normal file
34
include/llvm/InitializeAllTargets.h
Normal file
@@ -0,0 +1,34 @@
|
||||
//===- llvm/InitializeAllTargets.h - Initialize All Targets -----*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This header initializes all configured LLVM targets, ensuring that they
|
||||
// are registered.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
#ifndef LLVM_INITIALIZE_ALL_TARGETS_H
|
||||
#define LLVM_INITIALIZE_ALL_TARGETS_H
|
||||
|
||||
namespace llvm {
|
||||
|
||||
// Declare all of the target-initialization functions.
|
||||
#define LLVM_TARGET(TargetName) void Initialize##TargetName##Target();
|
||||
#include "llvm/Config/Targets.def"
|
||||
|
||||
namespace {
|
||||
struct InitializeAllTargets {
|
||||
InitializeAllTargets() {
|
||||
// Call all of the target-initialization functions.
|
||||
#define LLVM_TARGET(TargetName) llvm::Initialize##TargetName##Target();
|
||||
#include "llvm/Config/Targets.def"
|
||||
}
|
||||
} DoInitializeAllTargets;
|
||||
}
|
||||
} // end namespace llvm
|
||||
|
||||
#endif // LLVM_INITIALIZE_ALL_TARGETS_H
|
||||
Reference in New Issue
Block a user