summaryrefslogtreecommitdiffstats
path: root/lib/IR
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-11-18 23:33:32 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-11-18 23:33:32 +0000
commit4adba52570723c2e1654b1c01feddf759893f096 (patch)
treebbabddbffef1149beb61818d217502eecc8a0944 /lib/IR
parenta7b7a7d629c3101f6f6c87e6848e865734e0238c (diff)
downloadexternal_llvm-4adba52570723c2e1654b1c01feddf759893f096.zip
external_llvm-4adba52570723c2e1654b1c01feddf759893f096.tar.gz
external_llvm-4adba52570723c2e1654b1c01feddf759893f096.tar.bz2
DebugInfo: Simplify a few more explicit constructions, underconstrained types, and make DIType(MDNode*) explicit like all the other DI* node ctors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195055 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR')
-rw-r--r--lib/IR/DIBuilder.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/IR/DIBuilder.cpp b/lib/IR/DIBuilder.cpp
index bdbba1b..c4a9f41 100644
--- a/lib/IR/DIBuilder.cpp
+++ b/lib/IR/DIBuilder.cpp
@@ -752,11 +752,11 @@ DICompositeType DIBuilder::createEnumerationType(
NULL,
UniqueIdentifier.empty() ? NULL : MDString::get(VMContext, UniqueIdentifier)
};
- MDNode *Node = MDNode::get(VMContext, Elts);
- AllEnumTypes.push_back(Node);
+ DICompositeType CTy(MDNode::get(VMContext, Elts));
+ AllEnumTypes.push_back(CTy);
if (!UniqueIdentifier.empty())
- retainType(Node);
- return DICompositeType(Node);
+ retainType(CTy);
+ return CTy;
}
/// createArrayType - Create debugging information entry for an array.