[AArch64] Emit .ident compiler version attribute.
authorChad Rosier <mcrosier@codeaurora.org>
Tue, 10 Jun 2014 14:32:08 +0000 (14:32 +0000)
committerChad Rosier <mcrosier@codeaurora.org>
Tue, 10 Jun 2014 14:32:08 +0000 (14:32 +0000)
Patch by Ana Pazos<apazos@codeaurora.org>!

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

lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp
test/CodeGen/AArch64/compiler-ident.ll [new file with mode: 0644]

index dc4a8bf6c9a93f6cc6d21b26f8b9c7283df96eef..1763b40e2d48b80b7647db97a99ec284bc747b18 100644 (file)
@@ -96,4 +96,6 @@ AArch64MCAsmInfoELF::AArch64MCAsmInfoELF(StringRef TT) {
   ExceptionsType = ExceptionHandling::DwarfCFI;
 
   UseIntegratedAssembler = true;
+
+  HasIdentDirective = true;
 }
diff --git a/test/CodeGen/AArch64/compiler-ident.ll b/test/CodeGen/AArch64/compiler-ident.ll
new file mode 100644 (file)
index 0000000..0350571
--- /dev/null
@@ -0,0 +1,12 @@
+; RUN: llc -o - %s -mtriple=aarch64-linux-gnu | FileCheck %s
+
+; ModuleID = 'compiler-ident.c'
+target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
+target triple = "aarch64--linux-gnu"
+
+; CHECK: .ident  "some LLVM version"
+
+!llvm.ident = !{!0}
+
+!0 = metadata !{metadata !"some LLVM version"}
+