summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2013-06-27 22:50:59 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2013-06-27 22:50:59 +0000
commita4a47cb97bc0fdfdec5f2170787e7dd83de08013 (patch)
tree81b59ccf11ae3c490ee8605a6a7ee410fa07a089 /llvm/lib/IR
parent296adb8b12076f466da981cd8f276a9f0e9d147c (diff)
downloadbcm5719-llvm-a4a47cb97bc0fdfdec5f2170787e7dd83de08013.tar.gz
bcm5719-llvm-a4a47cb97bc0fdfdec5f2170787e7dd83de08013.zip
Rename DIBuilder::createNullPtrType to createUnspecifiedType and introduce
a zero-argument createNullPtrType function for creating the canonical nullptr type. Differential Revision: http://llvm-reviews.chandlerc.com/D1050 llvm-svn: 185114
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r--llvm/lib/IR/DIBuilder.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index 0dc0ed1720b..e30dcdca32a 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -208,11 +208,11 @@ DIEnumerator DIBuilder::createEnumerator(StringRef Name, int64_t Val) {
return DIEnumerator(MDNode::get(VMContext, Elts));
}
-/// createNullPtrType - Create C++11 nullptr type.
-DIBasicType DIBuilder::createNullPtrType(StringRef Name) {
+/// \brief Create a DWARF unspecified type.
+DIBasicType DIBuilder::createUnspecifiedType(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.
+ // Unspecified types are 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, // Filename
@@ -228,6 +228,11 @@ DIBasicType DIBuilder::createNullPtrType(StringRef Name) {
return DIBasicType(MDNode::get(VMContext, Elts));
}
+/// \brief Create C++11 nullptr type.
+DIBasicType DIBuilder::createNullPtrType() {
+ return createUnspecifiedType("decltype(nullptr)");
+}
+
/// createBasicType - Create debugging information entry for a basic
/// type, e.g 'char'.
DIBasicType
OpenPOWER on IntegriCloud