Movatterモバイル変換


[0]ホーム

URL:


LLVM 20.0.0git
Module.cpp
Go to the documentation of this file.
1//===- Module.cpp ---------------------------------------------------------===//
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/SandboxIR/Module.h"
10#include "llvm/SandboxIR/Constant.h"
11#include "llvm/SandboxIR/Context.h"
12#include "llvm/SandboxIR/Function.h"
13#include "llvm/SandboxIR/Value.h"
14
15using namespacellvm::sandboxir;
16
17Function *Module::getFunction(StringRefName) const{
18llvm::Function *LLVMF = LLVMM.getFunction(Name);
19return cast_or_null<Function>(Ctx.getValue(LLVMF));
20}
21
22GlobalVariable *Module::getGlobalVariable(StringRefName,
23bool AllowInternal) const{
24return cast_or_null<GlobalVariable>(
25 Ctx.getValue(LLVMM.getGlobalVariable(Name, AllowInternal)));
26}
27
28GlobalAlias *Module::getNamedAlias(StringRefName) const{
29return cast_or_null<GlobalAlias>(Ctx.getValue(LLVMM.getNamedAlias(Name)));
30}
31
32GlobalIFunc *Module::getNamedIFunc(StringRefName) const{
33return cast_or_null<GlobalIFunc>(Ctx.getValue(LLVMM.getNamedIFunc(Name)));
34}
35
36#ifndef NDEBUG
37voidModule::dumpOS(raw_ostream &OS) const{OS << LLVMM; }
38
39voidModule::dump() const{
40 dumpOS(dbgs());
41dbgs() <<"\n";
42}
43#endif// NDEBUG
Name
std::string Name
Definition:ELFObjHandler.cpp:77
OS
raw_pwrite_stream & OS
Definition:SampleProfWriter.cpp:51
Constant.h
Context.h
Function.h
Module.h
Value.h
llvm::Function
Definition:Function.h:63
llvm::Function::getFunction
const Function & getFunction() const
Definition:Function.h:171
llvm::GlobalAlias
Definition:GlobalAlias.h:28
llvm::GlobalIFunc
Definition:GlobalIFunc.h:34
llvm::GlobalVariable
Definition:GlobalVariable.h:39
llvm::Module::getFunction
Function * getFunction(StringRef Name) const
Look up the specified function in the module symbol table.
Definition:Module.cpp:228
llvm::Module::dump
void dump() const
Dump the module to stderr (for debugging).
Definition:AsmWriter.cpp:5323
llvm::Module::getNamedIFunc
GlobalIFunc * getNamedIFunc(StringRef Name) const
Return the global ifunc in the module with the specified name, of arbitrary type.
Definition:Module.cpp:290
llvm::Module::getGlobalVariable
GlobalVariable * getGlobalVariable(StringRef Name) const
Look up the specified global variable in the module symbol table.
Definition:Module.h:447
llvm::Module::getNamedAlias
GlobalAlias * getNamedAlias(StringRef Name) const
Return the global alias in the module with the specified name, of arbitrary type.
Definition:Module.cpp:286
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition:StringRef.h:51
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition:raw_ostream.h:52
llvm::sandboxir::Module::dumpOS
void dumpOS(raw_ostream &OS) const
Definition:Module.cpp:37
llvm::sandboxir
Definition:Argument.h:15
llvm::dbgs
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
Definition:Debug.cpp:163

Generated on Sun Jul 20 2025 09:42:09 for LLVM by doxygen 1.9.6
[8]ページ先頭

©2009-2025 Movatter.jp