From 2ce067a9fb5b2d046c92519428cafa71fae81ed4 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Tue, 12 Feb 2013 00:40:41 +0000 Subject: [PATCH] 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 --- include/llvm/DIBuilder.h | 5 +++-- lib/IR/DIBuilder.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/llvm/DIBuilder.h b/include/llvm/DIBuilder.h index fb7aa8b38a8..25e0fffb8f9 100644 --- a/include/llvm/DIBuilder.h +++ b/include/llvm/DIBuilder.h @@ -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'. diff --git a/lib/IR/DIBuilder.cpp b/lib/IR/DIBuilder.cpp index cc397cdf351..df1a81f10bd 100644 --- a/lib/IR/DIBuilder.cpp +++ b/lib/IR/DIBuilder.cpp @@ -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 -- 2.11.0