LLVM 22.0.0git
TargetLoweringObjectFile.cpp File Reference

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()

bool isNullOrUndef ( const Constant * C)
static

◆ IsNullTerminatedString()

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(), llvm::CallingConv::C, llvm::cast(), llvm::dyn_cast(), and llvm::isa().

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

◆ isSuitableForBSS()