OSDN Git Service

[DebugInfo] Refactoring DIType::setFlags to DIType::cloneWithFlags, NFC
authorRoman Tereshin <rtereshin@apple.com>
Fri, 1 Jun 2018 23:15:09 +0000 (23:15 +0000)
committerRoman Tereshin <rtereshin@apple.com>
Fri, 1 Jun 2018 23:15:09 +0000 (23:15 +0000)
commita82bdae05937330d9ea24063a96ba209a321d4aa
tree7ae7f986ba3e0755c24866e237462f5a37b36a8c
parent893c5df3e31c9efd370764f68c8d5eb99eebe1d0
[DebugInfo] Refactoring DIType::setFlags to DIType::cloneWithFlags, NFC

and using the latter in DIBuilder::createArtificialType and
DIBuilder::createObjectPointerType methods as well as introducing
mirroring DISubprogram::cloneWithFlags and
DIBuilder::createArtificialSubprogram methods.

The primary goal here is to add createArtificialSubprogram to support
a pass downstream while keeping the method consistent with the
existing ones and making sure we don't encourage changing already
created DI-nodes.

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D47615

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333806 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm-c/DebugInfo.h
include/llvm/IR/DIBuilder.h
include/llvm/IR/DebugInfoMetadata.h
lib/IR/DIBuilder.cpp
unittests/IR/IRBuilderTest.cpp
unittests/IR/MetadataTest.cpp