Make the LLVM headers "-ansi -pedantic -Wno-long-long" clean.
[oota-llvm.git] / include / llvm / Analysis / LinkAllAnalyses.h
1 //===- LinkAllAnalyses.h - Reference All Analysis Passes --------*- C++ -*-===//
2 //
3 //                      The LLVM Compiler Infrastructure
4 //
5 // This file was developed by Chris Lattner and is distributed under the
6 // University of Illinois Open Source License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This header file pulls in all analysis passes for tools like analyze and
11 // bugpoint that need this functionality.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_ANALYSIS_LINKALLANALYSES_H
16 #define LLVM_ANALYSIS_LINKALLANALYSES_H
17
18 #include "llvm/Analysis/AliasSetTracker.h"
19 #include "llvm/Analysis/FindUsedTypes.h"
20 #include "llvm/Analysis/IntervalPartition.h"
21 #include "llvm/Analysis/PostDominators.h"
22 #include "llvm/Analysis/Passes.h"
23 #include "llvm/Analysis/ScalarEvolution.h"
24 #include "llvm/Analysis/DataStructure/DataStructure.h"
25 #include "llvm/Function.h"
26 #include <cstdlib>
27
28 namespace {
29   struct ForceAnalysisPassLinking {
30     ForceAnalysisPassLinking() {
31       // We must reference the passes in such a way that compilers will not
32       // delete it all as dead code, even with whole program optimization,
33       // yet is effectively a NO-OP. As the compiler isn't smart enough
34       // to know that getenv() never returns -1, this will do the job.
35       if (std::getenv("bar") != (char*) -1)
36         return;
37
38       (void)new llvm::LocalDataStructures();
39       (void)new llvm::BUDataStructures();
40       (void)new llvm::TDDataStructures();
41       (void)new llvm::CompleteBUDataStructures();
42       (void)new llvm::EquivClassGraphs();
43       (void)llvm::createDataStructureStatsPass();
44       (void)llvm::createDataStructureGraphCheckerPass();
45       (void)llvm::createProfileLoaderPass();
46       (void)llvm::createNoProfileInfoPass();
47       (void)llvm::createInstCountPass();
48       (void)new llvm::IntervalPartition();
49       (void)new llvm::ImmediateDominators();
50       (void)new llvm::PostDominatorSet();
51       (void)new llvm::FindUsedTypes();
52       (void)new llvm::ScalarEvolution();
53       ((llvm::Function*)0)->viewCFGOnly();
54       llvm::AliasSetTracker X(*(llvm::AliasAnalysis*)0);
55       X.add((llvm::Value*)0, 0);  // for -print-alias-sets
56     }
57   } ForceAnalysisPassLinking;
58 }
59
60 #endif