summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-02-03 23:08:54 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-02-03 23:08:54 +0000
commit3f7a92d33de95554e6a87863f8e684b793568128 (patch)
tree9ff42259cb9a04762794695f42fcc673aed003fc /lib
parent2a3e343d86d2b25b0239aa9cd88fa3c38cb052b8 (diff)
downloadllvm-3f7a92d33de95554e6a87863f8e684b793568128.tar.gz
llvm-3f7a92d33de95554e6a87863f8e684b793568128.tar.bz2
llvm-3f7a92d33de95554e6a87863f8e684b793568128.tar.xz
DIBuilder: simplify array generation to produce true zero-length arrays
For some anachronistic reason we were producing {i32 0} for zero-length debug info arrays. (this change is paired with a Clang change and may cause temporary buildbot noise) Let's not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200721 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/IR/DIBuilder.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/IR/DIBuilder.cpp b/lib/IR/DIBuilder.cpp
index c7e7584900..fc80ba9e64 100644
--- a/lib/IR/DIBuilder.cpp
+++ b/lib/IR/DIBuilder.cpp
@@ -902,10 +902,6 @@ DIBuilder::createForwardDecl(unsigned Tag, StringRef Name, DIDescriptor Scope,
/// getOrCreateArray - Get a DIArray, create one if required.
DIArray DIBuilder::getOrCreateArray(ArrayRef<Value *> Elements) {
- if (Elements.empty()) {
- Value *Null = Constant::getNullValue(Type::getInt32Ty(VMContext));
- return DIArray(MDNode::get(VMContext, Null));
- }
return DIArray(MDNode::get(VMContext, Elements));
}