LLVM 19.0.0git
Functions
TargetLoweringObjectFile.cpp File Reference
#include "llvm/Target/TargetLoweringObjectFile.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/Mangler.h"
#include "llvm/IR/Module.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/SectionKind.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"

Go to the source code of this file.

Functions

static bool isNullOrUndef (const Constant *C)
 
static bool isSuitableForBSS (const GlobalVariable *GV)
 
static bool IsNullTerminatedString (const Constant *C)
 IsNullTerminatedString - Return true if the specified constant (which is known to have a type that is an array of 1/2/4 byte elements) ends with a nul value and contains no other nuls in it.
 

Function Documentation

◆ isNullOrUndef()

static bool isNullOrUndef ( const Constant C)
static

Definition at line 68 of file TargetLoweringObjectFile.cpp.

References llvm::CallingConv::C, and isNullOrUndef().

Referenced by isNullOrUndef(), and isSuitableForBSS().

◆ IsNullTerminatedString()

static bool IsNullTerminatedString ( const Constant C)
static

IsNullTerminatedString - Return true if the specified constant (which is known to have a type that is an array of 1/2/4 byte elements) ends with a nul value and contains no other nuls in it.

Note that this is more general than ConstantDataSequential::isString because we allow 2 & 4 byte strings.

Definition at line 104 of file TargetLoweringObjectFile.cpp.

References assert(), and llvm::CallingConv::C.

Referenced by llvm::TargetLoweringObjectFile::getKindForGlobal().

◆ isSuitableForBSS()

static bool isSuitableForBSS ( const GlobalVariable GV)
static