aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenTypes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.cpp')
-rw-r--r--lib/CodeGen/CodeGenTypes.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp
index 94db836665..6826122ad9 100644
--- a/lib/CodeGen/CodeGenTypes.cpp
+++ b/lib/CodeGen/CodeGenTypes.cpp
@@ -229,6 +229,12 @@ const llvm::Type *CodeGenTypes::ConvertNewType(QualType T) {
return getTypeForFormat(getLLVMContext(),
Context.getFloatTypeSemantics(T));
+ case BuiltinType::NullPtr: {
+ // Model std::nullptr_t as i8*
+ const llvm::Type *Ty = llvm::IntegerType::get(getLLVMContext(), 8);
+ return llvm::PointerType::getUnqual(Ty);
+ }
+
case BuiltinType::UInt128:
case BuiltinType::Int128:
return llvm::IntegerType::get(getLLVMContext(), 128);