[PATCH] D21451: Emit the DWARF tag for the RenderScript language

Pirama Arumuga Nainar via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 16 15:06:51 PDT 2016


pirama created this revision.
pirama added a reviewer: rsmith.
pirama added subscribers: srhines, cfe-commits.

If the RenderScript LangOpt is set, either via '-x renderscript' or the '.rs'
file extension, set the DWARF language tag to be that of RenderScript.

http://reviews.llvm.org/D21451

Files:
  lib/CodeGen/CGDebugInfo.cpp
  test/CodeGen/debug-info-renderscript-tag.rs

Index: test/CodeGen/debug-info-renderscript-tag.rs
===================================================================
--- /dev/null
+++ test/CodeGen/debug-info-renderscript-tag.rs
@@ -0,0 +1,3 @@
+// RUN: %clang -emit-llvm -S -g %s -o - | FileCheck %s
+
+// CHECK: !DICompileUnit(language: DW_LANG_GOOGLE_RenderScript{{.*}})
Index: lib/CodeGen/CGDebugInfo.cpp
===================================================================
--- lib/CodeGen/CGDebugInfo.cpp
+++ lib/CodeGen/CGDebugInfo.cpp
@@ -383,6 +383,8 @@
       LangTag = llvm::dwarf::DW_LANG_C_plus_plus;
   } else if (LO.ObjC1) {
     LangTag = llvm::dwarf::DW_LANG_ObjC;
+  } else if (LO.RenderScript) {
+    LangTag = llvm::dwarf::DW_LANG_GOOGLE_RenderScript;
   } else if (LO.C99) {
     LangTag = llvm::dwarf::DW_LANG_C99;
   } else {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21451.61038.patch
Type: text/x-patch
Size: 799 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160616/aeb7a0b2/attachment.bin>


More information about the cfe-commits mailing list