]> granicus.if.org Git - clang/commitdiff
Emit the DWARF tag for the RenderScript language
authorPirama Arumuga Nainar <pirama@google.com>
Tue, 21 Jun 2016 21:35:11 +0000 (21:35 +0000)
committerPirama Arumuga Nainar <pirama@google.com>
Tue, 21 Jun 2016 21:35:11 +0000 (21:35 +0000)
Summary:
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.

Reviewers: rsmith

Subscribers: cfe-commits, srhines

Differential Revision: http://reviews.llvm.org/D21451

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273321 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp
test/CodeGen/debug-info-renderscript-tag.rs [new file with mode: 0644]

index e8536dbc68d7a5d08fe5faac96ec40bed942a749..441135dc90d0ee5746a295b02a2cfc1fb918b1be 100644 (file)
@@ -377,6 +377,8 @@ void CGDebugInfo::CreateCompileUnit() {
       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 {
diff --git a/test/CodeGen/debug-info-renderscript-tag.rs b/test/CodeGen/debug-info-renderscript-tag.rs
new file mode 100644 (file)
index 0000000..ded650d
--- /dev/null
@@ -0,0 +1,3 @@
+// RUN: %clang -emit-llvm -S -g %s -o - | FileCheck %s
+
+// CHECK: !DICompileUnit(language: DW_LANG_GOOGLE_RenderScript{{.*}})