Move the DebugEmissionKind enum from DIBuilder into DICompileUnit.
This mostly cosmetic patch moves the DebugEmissionKind enum from DIBuilder
into DICompileUnit. DIBuilder is not the right place for this enum to live
in — a metadata consumer should not have to include DIBuilder.h.
I also added a Verifier check that checks that the emission kind of a
DICompileUnit is actually legal.
http://reviews.llvm.org/D18612
<rdar://problem/25427165>
llvm-svn: 265077
diff --git a/llvm/unittests/IR/MetadataTest.cpp b/llvm/unittests/IR/MetadataTest.cpp
index cb3182a..5c53ec7 100644
--- a/llvm/unittests/IR/MetadataTest.cpp
+++ b/llvm/unittests/IR/MetadataTest.cpp
@@ -1305,7 +1305,7 @@
StringRef Flags = "flag after flag";
unsigned RuntimeVersion = 2;
StringRef SplitDebugFilename = "another/file";
- unsigned EmissionKind = 3;
+ auto EmissionKind = DICompileUnit::FullDebug;
MDTuple *EnumTypes = getTuple();
MDTuple *RetainedTypes = getTuple();
MDTuple *Subprograms = getTuple();
@@ -1368,7 +1368,7 @@
StringRef Flags = "flag after flag";
unsigned RuntimeVersion = 2;
StringRef SplitDebugFilename = "another/file";
- unsigned EmissionKind = 3;
+ auto EmissionKind = DICompileUnit::FullDebug;
MDTuple *EnumTypes = MDTuple::getDistinct(Context, None);
MDTuple *RetainedTypes = MDTuple::getDistinct(Context, None);
MDTuple *ImportedEntities = MDTuple::getDistinct(Context, None);