LLVM
4.0.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
llvm.src
include
llvm
LinkAllIR.h
Go to the documentation of this file.
1
//===----- LinkAllIR.h - Reference All VMCore Code --------------*- C++ -*-===//
2
//
3
// The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
//
10
// This header file pulls in all the object modules of the VMCore library so
11
// that tools like llc, opt, and lli can ensure they are linked with all symbols
12
// from libVMCore.a It should only be used from a tool's main program.
13
//
14
//===----------------------------------------------------------------------===//
15
16
#ifndef LLVM_LINKALLIR_H
17
#define LLVM_LINKALLIR_H
18
19
#include "
llvm/IR/InlineAsm.h
"
20
#include "
llvm/IR/Instructions.h
"
21
#include "
llvm/IR/IntrinsicInst.h
"
22
#include "
llvm/IR/LLVMContext.h
"
23
#include "
llvm/IR/Module.h
"
24
#include "
llvm/IR/Verifier.h
"
25
#include "
llvm/Support/Dwarf.h
"
26
#include "
llvm/Support/DynamicLibrary.h
"
27
#include "
llvm/Support/MathExtras.h
"
28
#include "
llvm/Support/Memory.h
"
29
#include "
llvm/Support/Mutex.h
"
30
#include "
llvm/Support/Path.h
"
31
#include "
llvm/Support/Process.h
"
32
#include "
llvm/Support/Program.h
"
33
#include "
llvm/Support/Signals.h
"
34
#include <cstdlib>
35
36
namespace
{
37
struct
ForceVMCoreLinking {
38
ForceVMCoreLinking() {
39
// We must reference VMCore in such a way that compilers will not
40
// delete it all as dead code, even with whole program optimization,
41
// yet is effectively a NO-OP. As the compiler isn't smart enough
42
// to know that getenv() never returns -1, this will do the job.
43
if
(std::getenv(
"bar"
) != (
char
*) -1)
44
return
;
45
llvm::LLVMContext
Context
;
46
(void)
new
llvm::Module
(
""
, Context);
47
(void)
new
llvm::UnreachableInst
(Context);
48
(void)
llvm::createVerifierPass
();
49
}
50
} ForceVMCoreLinking;
51
}
52
53
#endif
Context
LLVMContext & Context
Definition:
NVVMIntrRange.cpp:72
Instructions.h
llvm::Module
A Module instance is used to store all the information related to an LLVM module. ...
Definition:
Module.h:52
IntrinsicInst.h
llvm::createVerifierPass
FunctionPass * createVerifierPass(bool FatalErrors=true)
Definition:
Verifier.cpp:4791
Memory.h
InlineAsm.h
DynamicLibrary.h
MathExtras.h
llvm::LLVMContext
This is an important class for using LLVM in a threaded context.
Definition:
LLVMContext.h:48
llvm::UnreachableInst
This function has undefined behavior.
Definition:
Instructions.h:4476
Program.h
Mutex.h
Module.h
Module.h This file contains the declarations for the Module class.
Verifier.h
Dwarf.h
Path.h
Process.h
Provides a library for accessing information about this process and other processes on the operating ...
LLVMContext.h
Signals.h
Generated on Wed Mar 8 2017 17:12:21 for LLVM by
1.8.6