LLVM
17.0.0git
lib
Transforms
Utils
HelloWorld.cpp
Go to the documentation of this file.
1
//===-- HelloWorld.cpp - Example Transformations --------------------------===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#include "
llvm/Transforms/Utils/HelloWorld.h
"
10
11
using namespace
llvm
;
12
13
PreservedAnalyses
HelloWorldPass::run
(
Function
&
F
,
14
FunctionAnalysisManager
&AM) {
15
errs
() <<
F
.getName() <<
"\n"
;
16
return
PreservedAnalyses::all
();
17
}
llvm::PreservedAnalyses
A set of analyses that are preserved following a run of a transformation pass.
Definition:
PassManager.h:152
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
llvm::Function
Definition:
Function.h:59
llvm::errs
raw_fd_ostream & errs()
This returns a reference to a raw_ostream for standard error.
Definition:
raw_ostream.cpp:891
F
#define F(x, y, z)
Definition:
MD5.cpp:55
HelloWorld.h
llvm::HelloWorldPass::run
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
Definition:
HelloWorld.cpp:13
llvm::PreservedAnalyses::all
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
Definition:
PassManager.h:158
llvm::AnalysisManager
A container for analyses that lazily runs them and caches their results.
Definition:
InstructionSimplify.h:42
Generated on Sat Jan 28 2023 11:02:26 for LLVM by
1.8.17