mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-04 04:19:25 +00:00
Add support to emit debug info for C++0x nullptr type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139751 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -146,6 +146,26 @@ DIEnumerator DIBuilder::createEnumerator(StringRef Name, uint64_t Val) {
|
||||
return DIEnumerator(MDNode::get(VMContext, Elts));
|
||||
}
|
||||
|
||||
/// createNullPtrType - Create C++0x nullptr type.
|
||||
DIType DIBuilder::createNullPtrType(StringRef Name) {
|
||||
assert(!Name.empty() && "Unable to create type without name");
|
||||
// nullptr is encoded in DIBasicType format. Line number, filename,
|
||||
// ,size, alignment, offset and flags are always empty here.
|
||||
Value *Elts[] = {
|
||||
GetTagConstant(VMContext, dwarf::DW_TAG_unspecified_type),
|
||||
NULL, //TheCU,
|
||||
MDString::get(VMContext, Name),
|
||||
NULL, // Filename
|
||||
ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Line
|
||||
ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Size
|
||||
ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Align
|
||||
ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Offset
|
||||
ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Flags;
|
||||
ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Encoding
|
||||
};
|
||||
return DIType(MDNode::get(VMContext, Elts));
|
||||
}
|
||||
|
||||
/// createBasicType - Create debugging information entry for a basic
|
||||
/// type, e.g 'char'.
|
||||
DIType DIBuilder::createBasicType(StringRef Name, uint64_t SizeInBits,
|
||||
|
Reference in New Issue
Block a user