Mark artificial types as such in the annotated debug output.
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 8 Jan 2013 00:31:02 +0000 (00:31 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 8 Jan 2013 00:31:02 +0000 (00:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171826 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/DebugInfo.cpp
test/DebugInfo/X86/elf-names.ll

index 6ca692e2745260ce61f3a1c5303f8fc5217dea7b..d2883080977a260e418fc988d9f7a7e5785da042 100644 (file)
@@ -1095,6 +1095,9 @@ void DIType::printInternal(raw_ostream &OS) const {
   else if (isProtected())
     OS << " [protected]";
 
+  if (isArtificial())
+    OS << " [artificial]";
+
   if (isForwardDecl())
     OS << " [fwd]";
 }
index 6e7154cfe80f1318d0a5b04578b03d01a860ab4b..b6a263dfcade3349ea08678bc6aa09c607c11d4d 100644 (file)
@@ -1,5 +1,6 @@
 ; RUN: llc -mtriple=x86_64-unknown-linux-gnu %s -o %t -filetype=obj
 ; RUN: llvm-dwarfdump %t | FileCheck %s
+; RUN: llvm-as < %s | llvm-dis | FileCheck --check-prefix=CHECK-DIS %s
 
 ; CHECK: 0x0000000b: DW_TAG_compile_unit
 ; CHECK: 0x00000012:   DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000035] = "foo.cpp")
@@ -9,6 +10,8 @@
 ; CHECK: 0x00000045:       DW_AT_name [DW_FORM_strp]     ( .debug_str[0x0000005d] = "c1")
 ; CHECK: 0x0000008d:       DW_AT_artificial [DW_FORM_flag_present]       (true)
 
+; CHECK-DIS: [artificial]
+
 %class.D = type { i32, i32, i32, i32 }
 
 @_ZN1DC1Ev = alias void (%class.D*)* @_ZN1DC2Ev