DIBuilder: make the return type of createBasicType more specific

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174924 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie 2013-02-12 00:40:41 +00:00
parent 6c3daabc3e
commit 2ce067a9fb
2 changed files with 7 additions and 6 deletions

View File

@ -28,6 +28,7 @@ namespace llvm {
class LLVMContext;
class MDNode;
class StringRef;
class DIBasicType;
class DIDescriptor;
class DIFile;
class DIEnumerator;
@ -108,8 +109,8 @@ namespace llvm {
/// @param SizeInBits Size of the type.
/// @param AlignInBits Type alignment.
/// @param Encoding DWARF encoding code, e.g. dwarf::DW_ATE_float.
DIType createBasicType(StringRef Name, uint64_t SizeInBits,
uint64_t AlignInBits, unsigned Encoding);
DIBasicType createBasicType(StringRef Name, uint64_t SizeInBits,
uint64_t AlignInBits, unsigned Encoding);
/// createQualifiedType - Create debugging information entry for a qualified
/// type, e.g. 'const int'.

View File

@ -162,9 +162,9 @@ DIType DIBuilder::createNullPtrType(StringRef Name) {
/// createBasicType - Create debugging information entry for a basic
/// type, e.g 'char'.
DIType DIBuilder::createBasicType(StringRef Name, uint64_t SizeInBits,
uint64_t AlignInBits,
unsigned Encoding) {
DIBasicType
DIBuilder::createBasicType(StringRef Name, uint64_t SizeInBits,
uint64_t AlignInBits, unsigned Encoding) {
assert(!Name.empty() && "Unable to create type without name");
// Basic types are encoded in DIBasicType format. Line number, filename,
// offset and flags are always empty here.
@ -180,7 +180,7 @@ DIType DIBuilder::createBasicType(StringRef Name, uint64_t SizeInBits,
ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Flags;
ConstantInt::get(Type::getInt32Ty(VMContext), Encoding)
};
return DIType(MDNode::get(VMContext, Elts));
return DIBasicType(MDNode::get(VMContext, Elts));
}
/// createQualifiedType - Create debugging information entry for a qualified