LLVM 20.0.0git
Functions
IRMover.cpp File Reference
#include "llvm/Linker/IRMover.h"
#include "LinkDiagnosticInfo.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/IR/AutoUpgrade.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/DiagnosticPrinter.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GVMaterializer.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PseudoProbe.h"
#include "llvm/IR/TypeFinder.h"
#include "llvm/Object/ModuleSymbolTable.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/Path.h"
#include "llvm/TargetParser/Triple.h"
#include "llvm/Transforms/Utils/ValueMapper.h"
#include <optional>
#include <utility>

Go to the source code of this file.

Functions

static void forceRenaming (GlobalValue *GV, StringRef Name)
 The LLVM SymbolTable class autorenames globals that conflict in the symbol table.
 
static StringRef getTypeNamePrefix (StringRef Name)
 
static void getArrayElements (const Constant *C, SmallVectorImpl< Constant * > &Dest)
 
static std::string adjustInlineAsm (const std::string &InlineAsm, const Triple &Triple)
 Return InlineAsm adjusted with target-specific directives if required.
 

Function Documentation

◆ adjustInlineAsm()

static std::string adjustInlineAsm ( const std::string &  InlineAsm,
const Triple Triple 
)
static

Return InlineAsm adjusted with target-specific directives if required.

For ARM and Thumb, we have to add directives to select the appropriate ISA to support mixing module-level inline assembly from ARM and Thumb modules.

Definition at line 1506 of file IRMover.cpp.

References llvm::Triple::arm, llvm::Triple::armeb, llvm::Triple::getArch(), llvm::Triple::thumb, and llvm::Triple::thumbeb.

◆ forceRenaming()

static void forceRenaming ( GlobalValue GV,
StringRef  Name 
)
static

The LLVM SymbolTable class autorenames globals that conflict in the symbol table.

This is good for all clients except for us. Go through the trouble to force this back.

Definition at line 567 of file IRMover.cpp.

References assert(), llvm::Value::getName(), llvm::GlobalValue::getParent(), llvm::GlobalValue::hasLocalLinkage(), Name, llvm::Value::setName(), and llvm::Value::takeName().

◆ getArrayElements()

static void getArrayElements ( const Constant C,
SmallVectorImpl< Constant * > &  Dest 
)
static

◆ getTypeNamePrefix()

static StringRef getTypeNamePrefix ( StringRef  Name)
static

Definition at line 778 of file IRMover.cpp.

References Name, and llvm::StringRef::npos.