summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h48
1 files changed, 25 insertions, 23 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index 8d5627ab382..bb7f1899d59 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -467,7 +467,7 @@ public:
/// Return a reference to the configured OpenCL runtime.
CGOpenCLRuntime &getOpenCLRuntime() {
- assert(OpenCLRuntime != 0);
+ assert(OpenCLRuntime != nullptr);
return *OpenCLRuntime;
}
@@ -479,17 +479,17 @@ public:
/// Return a reference to the configured CUDA runtime.
CGCUDARuntime &getCUDARuntime() {
- assert(CUDARuntime != 0);
+ assert(CUDARuntime != nullptr);
return *CUDARuntime;
}
ARCEntrypoints &getARCEntrypoints() const {
- assert(getLangOpts().ObjCAutoRefCount && ARCData != 0);
+ assert(getLangOpts().ObjCAutoRefCount && ARCData != nullptr);
return *ARCData;
}
RREntrypoints &getRREntrypoints() const {
- assert(RRData != 0);
+ assert(RRData != nullptr);
return *RRData;
}
@@ -554,8 +554,8 @@ public:
const TargetInfo &getTarget() const { return Target; }
CGCXXABI &getCXXABI() const { return *ABI; }
llvm::LLVMContext &getLLVMContext() { return VMContext; }
-
- bool shouldUseTBAA() const { return TBAA != 0; }
+
+ bool shouldUseTBAA() const { return TBAA != nullptr; }
const TargetCodeGenInfo &getTargetCodeGenInfo();
@@ -644,7 +644,7 @@ public:
/// with the specified type instead of whatever the normal requested type
/// would be.
llvm::Constant *GetAddrOfGlobalVar(const VarDecl *D,
- llvm::Type *Ty = 0);
+ llvm::Type *Ty = nullptr);
/// Return the address of the given function. If Ty is non-null, then this
/// function will use the specified type if it has to create it.
@@ -741,7 +741,7 @@ public:
/// \param GlobalName If provided, the name to use for the global
/// (if one is created).
llvm::Constant *GetAddrOfConstantString(StringRef Str,
- const char *GlobalName=0,
+ const char *GlobalName=nullptr,
unsigned Alignment=0);
/// Returns a pointer to a character array containing the literal and a
@@ -750,7 +750,7 @@ public:
/// \param GlobalName If provided, the name to use for the global (if one is
/// created).
llvm::Constant *GetAddrOfConstantCString(const std::string &str,
- const char *GlobalName=0,
+ const char *GlobalName=nullptr,
unsigned Alignment=0);
/// Returns a pointer to a constant global variable for the given file-scope
@@ -767,17 +767,18 @@ public:
QualType getObjCFastEnumerationStateType();
/// Return the address of the constructor of the given type.
- llvm::GlobalValue *GetAddrOfCXXConstructor(const CXXConstructorDecl *ctor,
- CXXCtorType ctorType,
- const CGFunctionInfo *fnInfo = 0,
- bool DontDefer = false);
+ llvm::GlobalValue *
+ GetAddrOfCXXConstructor(const CXXConstructorDecl *ctor, CXXCtorType ctorType,
+ const CGFunctionInfo *fnInfo = nullptr,
+ bool DontDefer = false);
/// Return the address of the constructor of the given type.
- llvm::GlobalValue *GetAddrOfCXXDestructor(const CXXDestructorDecl *dtor,
- CXXDtorType dtorType,
- const CGFunctionInfo *fnInfo = 0,
- llvm::FunctionType *fnType = 0,
- bool DontDefer = false);
+ llvm::GlobalValue *
+ GetAddrOfCXXDestructor(const CXXDestructorDecl *dtor,
+ CXXDtorType dtorType,
+ const CGFunctionInfo *fnInfo = nullptr,
+ llvm::FunctionType *fnType = nullptr,
+ bool DontDefer = false);
/// Given a builtin id for a function like "__builtin_fabsf", return a
/// Function* for "fabsf".
@@ -838,23 +839,24 @@ public:
/// Try to emit the initializer for the given declaration as a constant;
/// returns 0 if the expression cannot be emitted as a constant.
- llvm::Constant *EmitConstantInit(const VarDecl &D, CodeGenFunction *CGF = 0);
+ llvm::Constant *EmitConstantInit(const VarDecl &D,
+ CodeGenFunction *CGF = nullptr);
/// Try to emit the given expression as a constant; returns 0 if the
/// expression cannot be emitted as a constant.
llvm::Constant *EmitConstantExpr(const Expr *E, QualType DestType,
- CodeGenFunction *CGF = 0);
+ CodeGenFunction *CGF = nullptr);
/// Emit the given constant value as a constant, in the type's scalar
/// representation.
llvm::Constant *EmitConstantValue(const APValue &Value, QualType DestType,
- CodeGenFunction *CGF = 0);
+ CodeGenFunction *CGF = nullptr);
/// Emit the given constant value as a constant, in the type's memory
/// representation.
llvm::Constant *EmitConstantValueForMemory(const APValue &Value,
QualType DestType,
- CodeGenFunction *CGF = 0);
+ CodeGenFunction *CGF = nullptr);
/// Return the result of value-initializing the given type, i.e. a null
/// expression of the given type. This is usually, but not always, an LLVM
@@ -1031,7 +1033,7 @@ private:
llvm::Function *F,
bool IsIncompleteFunction);
- void EmitGlobalDefinition(GlobalDecl D, llvm::GlobalValue *GV = 0);
+ void EmitGlobalDefinition(GlobalDecl D, llvm::GlobalValue *GV = nullptr);
void EmitGlobalFunctionDefinition(GlobalDecl GD, llvm::GlobalValue *GV);
void EmitGlobalVarDefinition(const VarDecl *D);
OpenPOWER on IntegriCloud