[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>!

llvm-svn: 210535

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

index dc4a8bf..1763b40 100644 (file)
@@ -96,4 +96,6 @@ AArch64MCAsmInfoELF::AArch64MCAsmInfoELF(StringRef TT) {
   ExceptionsType = ExceptionHandling::DwarfCFI;
 
   UseIntegratedAssembler = true;
+
+  HasIdentDirective = true;
 }
diff --git a/llvm/test/CodeGen/AArch64/compiler-ident.ll b/llvm/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"}
+