summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Robinson <paul.robinson@sony.com>2019-01-08 17:52:29 +0000
committerPaul Robinson <paul.robinson@sony.com>2019-01-08 17:52:29 +0000
commit7402fd9a35bcfd534dbd339e0ccfcd0fa1642c9d (patch)
treea88b803e8a0b68d87b8471b453a5c5002dab9022
parent2dfa412efeabb4c249dcb089192b31badb3fc4d5 (diff)
downloadbcm5719-llvm-7402fd9a35bcfd534dbd339e0ccfcd0fa1642c9d.tar.gz
bcm5719-llvm-7402fd9a35bcfd534dbd339e0ccfcd0fa1642c9d.zip
Rename DIFlagFixedEnum to DIFlagEnumClass. NFC
llvm-svn: 350641
-rw-r--r--clang/test/CodeGen/debug-info-enum.cpp18
-rw-r--r--clang/test/CodeGenCXX/debug-info-enum-class.cpp10
-rw-r--r--llvm/include/llvm-c/DebugInfo.h3
-rw-r--r--llvm/include/llvm/IR/DIBuilder.h4
-rw-r--r--llvm/include/llvm/IR/DebugInfoFlags.def2
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp2
-rw-r--r--llvm/lib/IR/DIBuilder.cpp4
-rw-r--r--llvm/test/Assembler/DIEnumerator.ll12
-rw-r--r--llvm/test/DebugInfo/COFF/enum-co.ll2
-rw-r--r--llvm/test/DebugInfo/Generic/debug-info-enum.ll20
-rw-r--r--llvm/test/DebugInfo/X86/enum-class.ll4
11 files changed, 41 insertions, 40 deletions
diff --git a/clang/test/CodeGen/debug-info-enum.cpp b/clang/test/CodeGen/debug-info-enum.cpp
index 1237f28b9a5..bbe66bb9fa6 100644
--- a/clang/test/CodeGen/debug-info-enum.cpp
+++ b/clang/test/CodeGen/debug-info-enum.cpp
@@ -12,7 +12,7 @@ enum class E0 : signed char {
} x0;
// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E0"
// CHECK-SAME: baseType: ![[SCHAR:[0-9]+]]
-// CHECK-SAME: DIFlagFixedEnum
+// CHECK-SAME: DIFlagEnumClass
// CHECK-SAME: elements: ![[ELTS0:[0-9]+]]
// CHECK: ![[SCHAR]] = !DIBasicType(name: "signed char", size: 8, encoding: DW_ATE_signed_char)
// CHECK: ![[ELTS0]] = !{![[A0:[0-9]+]], ![[B0:[0-9]+]]}
@@ -22,7 +22,7 @@ enum class E0 : signed char {
enum class E1 : unsigned char { A1 = 255 } x1;
// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E1"
// CHECK-SAME: baseType: ![[UCHAR:[0-9]+]]
-// CHECK-SAME: DIFlagFixedEnum
+// CHECK-SAME: DIFlagEnumClass
// CHECK-SAME: elements: ![[ELTS1:[0-9]+]]
// CHECK: ![[UCHAR]] = !DIBasicType(name: "unsigned char", size: 8, encoding: DW_ATE_unsigned_char)
// CHECK: ![[ELTS1]] = !{![[A1:[0-9]+]]}
@@ -34,7 +34,7 @@ enum class E2 : signed short {
} x2;
// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E2"
// CHECK-SAME: baseType: ![[SHORT:[0-9]+]]
-// CHECK-SAME: DIFlagFixedEnum
+// CHECK-SAME: DIFlagEnumClass
// CHECK-SAME: elements: ![[ELTS2:[0-9]+]]
// CHECK: ![[SHORT]] = !DIBasicType(name: "short", size: 16, encoding: DW_ATE_signed)
// CHECK: ![[ELTS2]] = !{![[A2:[0-9]+]], ![[B2:[0-9]+]]}
@@ -44,7 +44,7 @@ enum class E2 : signed short {
enum class E3 : unsigned short { A3 = 65535 } x3;
// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E3"
// CHECK-SAME: baseType: ![[USHORT:[0-9]+]]
-// CHECK-SAME: DIFlagFixedEnum
+// CHECK-SAME: DIFlagEnumClass
// CHECK-SAME: elements: ![[ELTS3:[0-9]+]]
// CHECK: ![[USHORT]] = !DIBasicType(name: "unsigned short", size: 16, encoding: DW_ATE_unsigned)
// CHECK: ![[ELTS3]] = !{![[A3:[0-9]+]]}
@@ -53,7 +53,7 @@ enum class E3 : unsigned short { A3 = 65535 } x3;
enum class E4 : signed int { A4 = -2147483648, B4 = 2147483647 } x4;
// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E4"
// CHECK-SAME: baseType: ![[INT:[0-9]+]]
-// CHECK-SAME: DIFlagFixedEnum
+// CHECK-SAME: DIFlagEnumClass
// CHECK-SAME: elements: ![[ELTS4:[0-9]+]]
// CHECK: ![[INT]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
// CHECK: ![[ELTS4]] = !{![[A4:[0-9]+]], ![[B4:[0-9]+]]}
@@ -63,7 +63,7 @@ enum class E4 : signed int { A4 = -2147483648, B4 = 2147483647 } x4;
enum class E5 : unsigned int { A5 = 4294967295 } x5;
// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E5"
// CHECK-SAME: baseType: ![[UINT:[0-9]+]]
-// CHECK-SAME: DIFlagFixedEnum
+// CHECK-SAME: DIFlagEnumClass
// CHECK-SAME: elements: ![[ELTS5:[0-9]+]]
// CHECK: ![[UINT]] = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
// CHECK: ![[ELTS5]] = !{![[A5:[0-9]+]]}
@@ -75,7 +75,7 @@ enum class E6 : signed long long {
} x6;
// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E6"
// CHECK-SAME: baseType: ![[LONG:[0-9]+]]
-// CHECK-SAME: DIFlagFixedEnum
+// CHECK-SAME: DIFlagEnumClass
// CHECK-SAME: elements: ![[ELTS6:[0-9]+]]
// CHECK: ![[LONG]] = !DIBasicType(name: "long long int", size: 64, encoding: DW_ATE_signed)
// CHECK: ![[ELTS6]] = !{![[A6:[0-9]+]], ![[B6:[0-9]+]]}
@@ -85,7 +85,7 @@ enum class E6 : signed long long {
enum class E7 : unsigned long long { A7 = 18446744073709551615ULL } x7;
// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E7"
// CHECK-SAME: baseType: ![[ULONG:[0-9]+]]
-// CHECK-SAME: DIFlagFixedEnum
+// CHECK-SAME: DIFlagEnumClass
// CHECK-SAME: elements: ![[ELTS7:[0-9]+]]
// CHECK: ![[ULONG]] = !DIBasicType(name: "long long unsigned int", size: 64, encoding: DW_ATE_unsigned)
// CHECK: ![[ELTS7]] = !{![[A7:[0-9]+]]}
@@ -95,6 +95,6 @@ enum class E7 : unsigned long long { A7 = 18446744073709551615ULL } x7;
enum E8 { A8 = -128, B8 = 127 } x8;
// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E8"
// CHECK-SAME: baseType: ![[INT]]
-// CHECK-NOT: DIFlagFixedEnum
+// CHECK-NOT: DIFlagEnumClass
// CHECK: !DIEnumerator(name: "A8", value: -128)
diff --git a/clang/test/CodeGenCXX/debug-info-enum-class.cpp b/clang/test/CodeGenCXX/debug-info-enum-class.cpp
index 664fbb74a8b..3664c67bf36 100644
--- a/clang/test/CodeGenCXX/debug-info-enum-class.cpp
+++ b/clang/test/CodeGenCXX/debug-info-enum-class.cpp
@@ -15,7 +15,7 @@ D d;
// CHECK-SAME: baseType: ![[INT:[0-9]+]]
// CHECK-SAME: size: 32
// CHECK-NOT: offset:
-// CHECK-SAME: flags: DIFlagFixedEnum
+// CHECK-SAME: flags: DIFlagEnumClass
// CHECK-SAME: ){{$}}
// CHECK: ![[INT]] = !DIBasicType(name: "int"
// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "B"
@@ -23,7 +23,7 @@ D d;
// CHECK-SAME: baseType: ![[ULONG:[0-9]+]]
// CHECK-SAME: size: 64
// CHECK-NOT: offset:
-// CHECK-SAME: flags: DIFlagFixedEnum
+// CHECK-SAME: flags: DIFlagEnumClass
// CHECK-SAME: ){{$}}
// CHECK: ![[ULONG]] = !DIBasicType(name: "long unsigned int"
// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "C"
@@ -52,7 +52,7 @@ namespace test2 {
// FIXME: this should just be a declaration under -fno-standalone-debug
// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E"
// CHECK-SAME: scope: [[TEST2:![0-9]+]]
-// CHECK-NOT: DIFlagFixedEnum
+// CHECK-NOT: DIFlagEnumClass
// CHECK-SAME: elements: [[TEST_ENUMS:![0-9]+]]
// CHECK-SAME: identifier: "_ZTSN5test21EE"
// CHECK: [[TEST2]] = !DINamespace(name: "test2"
@@ -68,7 +68,7 @@ namespace test3 {
// FIXME: this should just be a declaration under -fno-standalone-debug
// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E"
// CHECK-SAME: scope: [[TEST3:![0-9]+]]
-// CHECK-NOT: DIFlagFixedEnum
+// CHECK-NOT: DIFlagEnumClass
// CHECK-SAME: elements: [[TEST_ENUMS]]
// CHECK-SAME: identifier: "_ZTSN5test31EE"
// CHECK: [[TEST3]] = !DINamespace(name: "test3"
@@ -80,7 +80,7 @@ void func(E *) {
namespace test4 {
// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E"
// CHECK-SAME: scope: [[TEST4:![0-9]+]]
-// CHECK-NOT: DIFlagFixedEnum
+// CHECK-NOT: DIFlagEnumClass
// CHECK-SAME: elements: [[TEST_ENUMS]]
// CHECK-SAME: identifier: "_ZTSN5test41EE"
// CHECK: [[TEST4]] = !DINamespace(name: "test4"
diff --git a/llvm/include/llvm-c/DebugInfo.h b/llvm/include/llvm-c/DebugInfo.h
index bc341da3d52..87a72034b0e 100644
--- a/llvm/include/llvm-c/DebugInfo.h
+++ b/llvm/include/llvm-c/DebugInfo.h
@@ -54,7 +54,8 @@ typedef enum {
LLVMDIFlagMainSubprogram = 1 << 21,
LLVMDIFlagTypePassByValue = 1 << 22,
LLVMDIFlagTypePassByReference = 1 << 23,
- LLVMDIFlagFixedEnum = 1 << 24,
+ LLVMDIFlagEnumClass = 1 << 24,
+ LLVMDIFlagFixedEnum = LLVMDIFlagEnumClass, // Deprecated.
LLVMDIFlagThunk = 1 << 25,
LLVMDIFlagTrivial = 1 << 26,
LLVMDIFlagBigEndian = 1 << 27,
diff --git a/llvm/include/llvm/IR/DIBuilder.h b/llvm/include/llvm/IR/DIBuilder.h
index 1fe7b36db00..443332b1b23 100644
--- a/llvm/include/llvm/IR/DIBuilder.h
+++ b/llvm/include/llvm/IR/DIBuilder.h
@@ -502,11 +502,11 @@ namespace llvm {
/// \param Elements Enumeration elements.
/// \param UnderlyingType Underlying type of a C++11/ObjC fixed enum.
/// \param UniqueIdentifier A unique identifier for the enum.
- /// \param IsFixed Boolean flag indicate if this is C++11/ObjC fixed enum.
+ /// \param IsScoped Boolean flag indicate if this is C++11/ObjC 'enum class'.
DICompositeType *createEnumerationType(
DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
uint64_t SizeInBits, uint32_t AlignInBits, DINodeArray Elements,
- DIType *UnderlyingType, StringRef UniqueIdentifier = "", bool IsFixed = false);
+ DIType *UnderlyingType, StringRef UniqueIdentifier = "", bool IsScoped = false);
/// Create subroutine type.
/// \param ParameterTypes An array of subroutine parameter types. This
diff --git a/llvm/include/llvm/IR/DebugInfoFlags.def b/llvm/include/llvm/IR/DebugInfoFlags.def
index a0a9c6bcacb..ce117aa452a 100644
--- a/llvm/include/llvm/IR/DebugInfoFlags.def
+++ b/llvm/include/llvm/IR/DebugInfoFlags.def
@@ -54,7 +54,7 @@ HANDLE_DI_FLAG((1 << 20), NoReturn)
HANDLE_DI_FLAG((1 << 21), MainSubprogram)
HANDLE_DI_FLAG((1 << 22), TypePassByValue)
HANDLE_DI_FLAG((1 << 23), TypePassByReference)
-HANDLE_DI_FLAG((1 << 24), FixedEnum)
+HANDLE_DI_FLAG((1 << 24), EnumClass)
HANDLE_DI_FLAG((1 << 25), Thunk)
HANDLE_DI_FLAG((1 << 26), Trivial)
HANDLE_DI_FLAG((1 << 27), BigEndian)
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
index 991dac7cf35..80b365f1aa4 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
@@ -1361,7 +1361,7 @@ void DwarfUnit::constructEnumTypeDIE(DIE &Buffer, const DICompositeType *CTy) {
if (DTy) {
if (DD->getDwarfVersion() >= 3)
addType(Buffer, DTy);
- if (DD->getDwarfVersion() >= 4 && (CTy->getFlags() & DINode::FlagFixedEnum))
+ if (DD->getDwarfVersion() >= 4 && (CTy->getFlags() & DINode::FlagEnumClass))
addFlag(Buffer, dwarf::DW_AT_enum_class);
}
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index d29759f5679..fb81634a286 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -504,11 +504,11 @@ DISubroutineType *DIBuilder::createSubroutineType(DITypeRefArray ParameterTypes,
DICompositeType *DIBuilder::createEnumerationType(
DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
uint64_t SizeInBits, uint32_t AlignInBits, DINodeArray Elements,
- DIType *UnderlyingType, StringRef UniqueIdentifier, bool IsFixed) {
+ DIType *UnderlyingType, StringRef UniqueIdentifier, bool IsScoped) {
auto *CTy = DICompositeType::get(
VMContext, dwarf::DW_TAG_enumeration_type, Name, File, LineNumber,
getNonCompileUnitScope(Scope), UnderlyingType, SizeInBits, AlignInBits, 0,
- IsFixed ? DINode::FlagFixedEnum : DINode::FlagZero, Elements, 0, nullptr,
+ IsScoped ? DINode::FlagEnumClass : DINode::FlagZero, Elements, 0, nullptr,
nullptr, UniqueIdentifier);
AllEnumTypes.push_back(CTy);
trackIfUnresolved(CTy);
diff --git a/llvm/test/Assembler/DIEnumerator.ll b/llvm/test/Assembler/DIEnumerator.ll
index 9dc3d7c9ec2..fdb91d451cc 100644
--- a/llvm/test/Assembler/DIEnumerator.ll
+++ b/llvm/test/Assembler/DIEnumerator.ll
@@ -40,9 +40,9 @@
; CHECK: !DIEnumerator(name: "B0", value: 2147483647)
-!10 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E1", file: !3, line: 3, baseType: !6, size: 32, flags: DIFlagFixedEnum, elements: !11, identifier: "_ZTS2E1")
+!10 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E1", file: !3, line: 3, baseType: !6, size: 32, flags: DIFlagEnumClass, elements: !11, identifier: "_ZTS2E1")
; CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E1"{{.*}}, baseType: ![[INT]]
-; CHECK-SAME: DIFlagFixedEnum
+; CHECK-SAME: DIFlagEnumClass
!11 = !{!12, !13}
!12 = !DIEnumerator(name: "A1", value: -2147483648)
!13 = !DIEnumerator(name: "B1", value: 2147483647)
@@ -50,9 +50,9 @@
; CHECK: !DIEnumerator(name: "B1", value: 2147483647)
-!14 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E2", file: !3, line: 5, baseType: !15, size: 64, flags: DIFlagFixedEnum, elements: !16, identifier: "_ZTS2E2")
+!14 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E2", file: !3, line: 5, baseType: !15, size: 64, flags: DIFlagEnumClass, elements: !16, identifier: "_ZTS2E2")
; CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E2"{{.*}}, baseType: ![[LONG:[0-9]+]]
-; CHECK-SAME: DIFlagFixedEnum
+; CHECK-SAME: DIFlagEnumClass
!15 = !DIBasicType(name: "long long int", size: 64, encoding: DW_ATE_signed)
; CHECK: ![[LONG]] = !DIBasicType(name: "long long int", size: 64, encoding: DW_ATE_signed)
!16 = !{!17, !18}
@@ -62,9 +62,9 @@
; CHECK: !DIEnumerator(name: "B2", value: 9223372036854775807)
-!19 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E3", file: !3, line: 7, baseType: !20, size: 64, flags: DIFlagFixedEnum, elements: !21, identifier: "_ZTS2E3")
+!19 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E3", file: !3, line: 7, baseType: !20, size: 64, flags: DIFlagEnumClass, elements: !21, identifier: "_ZTS2E3")
; CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E3"{{.*}}, baseType: ![[ULONG:[0-9]+]]
-; CHECK-SAME: DIFlagFixedEnum
+; CHECK-SAME: DIFlagEnumClass
!20 = !DIBasicType(name: "long long unsigned int", size: 64, encoding: DW_ATE_unsigned)
; CHECK: ![[ULONG]] = !DIBasicType(name: "long long unsigned int", size: 64, encoding: DW_ATE_unsigned)
!21 = !{!22}
diff --git a/llvm/test/DebugInfo/COFF/enum-co.ll b/llvm/test/DebugInfo/COFF/enum-co.ll
index 14c1955c46a..f7e67238ec0 100644
--- a/llvm/test/DebugInfo/COFF/enum-co.ll
+++ b/llvm/test/DebugInfo/COFF/enum-co.ll
@@ -138,7 +138,7 @@ attributes #1 = { nounwind readnone speculatable }
!5 = !{!6, !7}
!6 = !DIEnumerator(name: "ON", value: 0)
!7 = !DIEnumerator(name: "OFF", value: 1)
-!8 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "EnumClass", file: !1, line: 7, baseType: !4, size: 32, flags: DIFlagFixedEnum, elements: !9, identifier: ".?AW4EnumClass@@")
+!8 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "EnumClass", file: !1, line: 7, baseType: !4, size: 32, flags: DIFlagEnumClass, elements: !9, identifier: ".?AW4EnumClass@@")
!9 = !{!10, !11, !12}
!10 = !DIEnumerator(name: "RED", value: 0)
!11 = !DIEnumerator(name: "BLUE", value: 1)
diff --git a/llvm/test/DebugInfo/Generic/debug-info-enum.ll b/llvm/test/DebugInfo/Generic/debug-info-enum.ll
index 5d887cd5cb8..85e22931a5f 100644
--- a/llvm/test/DebugInfo/Generic/debug-info-enum.ll
+++ b/llvm/test/DebugInfo/Generic/debug-info-enum.ll
@@ -28,7 +28,7 @@
!4 = !{!5, !10, !14, !19, !23, !28, !32, !37, !41}
; Test enumeration with a fixed "signed char" underlying type.
-!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E0", file: !3, line: 2, baseType: !6, size: 8, flags: DIFlagFixedEnum, elements: !7, identifier: "_ZTS2E0")
+!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E0", file: !3, line: 2, baseType: !6, size: 8, flags: DIFlagEnumClass, elements: !7, identifier: "_ZTS2E0")
!6 = !DIBasicType(name: "signed char", size: 8, encoding: DW_ATE_signed_char)
!7 = !{!8, !9}
!8 = !DIEnumerator(name: "A0", value: -128)
@@ -46,7 +46,7 @@
; CHECK-NEXT: DW_AT_const_value (127)
; Test enumeration with a fixed "unsigned char" underlying type.
-!10 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E1", file: !3, line: 12, baseType: !11, size: 8, flags: DIFlagFixedEnum, elements: !12, identifier: "_ZTS2E1")
+!10 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E1", file: !3, line: 12, baseType: !11, size: 8, flags: DIFlagEnumClass, elements: !12, identifier: "_ZTS2E1")
!11 = !DIBasicType(name: "unsigned char", size: 8, encoding: DW_ATE_unsigned_char)
!12 = !{!13}
!13 = !DIEnumerator(name: "A1", value: 255, isUnsigned: true)
@@ -60,7 +60,7 @@
; CHECK-NEXT: DW_AT_const_value (255)
; Test enumeration with a fixed "short" underlying type.
-!14 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E2", file: !3, line: 18, baseType: !15, size: 16, flags: DIFlagFixedEnum, elements: !16, identifier: "_ZTS2E2")
+!14 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E2", file: !3, line: 18, baseType: !15, size: 16, flags: DIFlagEnumClass, elements: !16, identifier: "_ZTS2E2")
!15 = !DIBasicType(name: "short", size: 16, encoding: DW_ATE_signed)
!16 = !{!17, !18}
!17 = !DIEnumerator(name: "A2", value: -32768)
@@ -78,7 +78,7 @@
; CHECK-NEXT: DW_AT_const_value (32767)
; Test enumeration with a fixed "unsigned short" underlying type.
-!19 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E3", file: !3, line: 28, baseType: !20, size: 16, flags: DIFlagFixedEnum, elements: !21, identifier: "_ZTS2E3")
+!19 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E3", file: !3, line: 28, baseType: !20, size: 16, flags: DIFlagEnumClass, elements: !21, identifier: "_ZTS2E3")
!20 = !DIBasicType(name: "unsigned short", size: 16, encoding: DW_ATE_unsigned)
!21 = !{!22}
!22 = !DIEnumerator(name: "A3", value: 65535, isUnsigned: true)
@@ -92,7 +92,7 @@
; CHECK-NEXT: DW_AT_const_value (65535)
; Test enumeration with a fixed "int" underlying type.
-!23 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E4", file: !3, line: 34, baseType: !24, size: 32, flags: DIFlagFixedEnum, elements: !25, identifier: "_ZTS2E4")
+!23 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E4", file: !3, line: 34, baseType: !24, size: 32, flags: DIFlagEnumClass, elements: !25, identifier: "_ZTS2E4")
!24 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!25 = !{!26, !27}
!26 = !DIEnumerator(name: "A4", value: -2147483648)
@@ -110,7 +110,7 @@
; CHECK-NEXT: DW_AT_const_value (2147483647)
; Test enumeration with a fixed "unsigend int" underlying type.
-!28 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E5", file: !3, line: 41, baseType: !29, size: 32, flags: DIFlagFixedEnum, elements: !30, identifier: "_ZTS2E5")
+!28 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E5", file: !3, line: 41, baseType: !29, size: 32, flags: DIFlagEnumClass, elements: !30, identifier: "_ZTS2E5")
!29 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
!30 = !{!31}
!31 = !DIEnumerator(name: "A5", value: 4294967295, isUnsigned: true)
@@ -124,7 +124,7 @@
; CHECK-NEXT: DW_AT_const_value (4294967295)
; Test enumeration with a fixed "long long" underlying type.
-!32 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E6", file: !3, line: 47, baseType: !33, size: 64, flags: DIFlagFixedEnum, elements: !34, identifier: "_ZTS2E6")
+!32 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E6", file: !3, line: 47, baseType: !33, size: 64, flags: DIFlagEnumClass, elements: !34, identifier: "_ZTS2E6")
!33 = !DIBasicType(name: "long long int", size: 64, encoding: DW_ATE_signed)
!34 = !{!35, !36}
!35 = !DIEnumerator(name: "A6", value: -9223372036854775808)
@@ -142,7 +142,7 @@
; CHECK-NEXT: DW_AT_const_value (9223372036854775807)
; Test enumeration with a fixed "unsigned long long" underlying type.
-!37 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E7", file: !3, line: 57, baseType: !38, size: 64, flags: DIFlagFixedEnum, elements: !39, identifier: "_ZTS2E7")
+!37 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E7", file: !3, line: 57, baseType: !38, size: 64, flags: DIFlagEnumClass, elements: !39, identifier: "_ZTS2E7")
!38 = !DIBasicType(name: "long long unsigned int", size: 64, encoding: DW_ATE_unsigned)
!39 = !{!40}
!40 = !DIEnumerator(name: "A7", value: 18446744073709551615, isUnsigned: true)
@@ -168,11 +168,11 @@
; CHECK-NOT: DW_AT_enum_class
; CHECK: DW_AT_name ("E8")
-; Test enumeration without a fixed underlying type, but with the DIFlagFixedEnum
+; Test enumeration without a fixed underlying type, but with the DIFlagEnumClass
; set. The DW_AT_enum_class attribute should be absent. This behaviour is
; intented to keep compatibilty with existing DWARF consumers, which may imply
; the type is present whenever DW_AT_enum_class is set.
-!63 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E9", file: !3, line: 63, size: 32, flags: DIFlagFixedEnum, elements: !64, identifier: "_ZTS2E9")
+!63 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E9", file: !3, line: 63, size: 32, flags: DIFlagEnumClass, elements: !64, identifier: "_ZTS2E9")
!64 = !{!65, !66}
!65 = !DIEnumerator(name: "A9", value: -128)
!66 = !DIEnumerator(name: "B9", value: 127)
diff --git a/llvm/test/DebugInfo/X86/enum-class.ll b/llvm/test/DebugInfo/X86/enum-class.ll
index 92398c4202c..19b594ee831 100644
--- a/llvm/test/DebugInfo/X86/enum-class.ll
+++ b/llvm/test/DebugInfo/X86/enum-class.ll
@@ -13,13 +13,13 @@ source_filename = "test/DebugInfo/X86/enum-class.ll"
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
!1 = !DIGlobalVariable(name: "a", scope: null, file: !2, line: 4, type: !3, isLocal: false, isDefinition: true)
!2 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo/tmp")
-!3 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "A", file: !2, line: 1, baseType: !4, size: 32, flags: DIFlagFixedEnum, align: 32, elements: !5)
+!3 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "A", file: !2, line: 1, baseType: !4, size: 32, flags: DIFlagEnumClass, align: 32, elements: !5)
!4 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!5 = !{!6}
!6 = !DIEnumerator(name: "A1", value: 1)
!7 = !DIGlobalVariableExpression(var: !8, expr: !DIExpression()) ; [ DW_TAG_enumerator ]
!8 = !DIGlobalVariable(name: "b", scope: null, file: !2, line: 5, type: !9, isLocal: false, isDefinition: true)
-!9 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "B", file: !2, line: 2, baseType: !10, size: 64, flags: DIFlagFixedEnum, align: 64, elements: !11)
+!9 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "B", file: !2, line: 2, baseType: !10, size: 64, flags: DIFlagEnumClass, align: 64, elements: !11)
!10 = !DIBasicType(name: "long unsigned int", size: 64, align: 64, encoding: DW_ATE_unsigned)
!11 = !{!12}
!12 = !DIEnumerator(name: "B1", value: 1) ; [ DW_TAG_enumerator ]
OpenPOWER on IntegriCloud