Emit ARM build-attributes in the file scope (as header).

The ARM linker will check that .o files declare compatible
build attributes (e.g., all claim hard-float calling convention,
all claim VFP-vX ,etc.). Thus, in order to set up cross tests that
link LLC generated code against and Subzero generated code,
we need the build attributes to be compatible.

Pick ARMv7, hard-float calling convention, and neon, etc. which
we use for PNaCl LLVM.

Will probably have to reorganize to keep in sync once the ELF
writer also emits this.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076
R=kschimpf@google.com, stichnot@chromium.org

Review URL: https://codereview.chromium.org/1171563002.
diff --git a/src/IceTargetLowering.cpp b/src/IceTargetLowering.cpp
index b8f11bb..aefad00 100644
--- a/src/IceTargetLowering.cpp
+++ b/src/IceTargetLowering.cpp
@@ -437,13 +437,25 @@
   TargetArch Target = Ctx->getFlags().getTargetArch();
 #define SUBZERO_TARGET(X)                                                      \
   if (Target == Target_##X)                                                    \
-    return std::unique_ptr<TargetDataLowering>(TargetData##X::create(Ctx));
+    return TargetData##X::create(Ctx);
 #include "llvm/Config/SZTargets.def"
 
-  llvm_unreachable("Unsupported target data lowering");
-  return nullptr;
+  llvm::report_fatal_error("Unsupported target data lowering");
 }
 
 TargetDataLowering::~TargetDataLowering() {}
 
+std::unique_ptr<TargetHeaderLowering>
+TargetHeaderLowering::createLowering(GlobalContext *Ctx) {
+  TargetArch Target = Ctx->getFlags().getTargetArch();
+#define SUBZERO_TARGET(X)                                                      \
+  if (Target == Target_##X)                                                    \
+    return TargetHeader##X::create(Ctx);
+#include "llvm/Config/SZTargets.def"
+
+  llvm::report_fatal_error("Unsupported target header lowering");
+}
+
+TargetHeaderLowering::~TargetHeaderLowering() {}
+
 } // end of namespace Ice