[llvm-exegesis][NFC] Some code style cleanup
Apply review comments of https://reviews.llvm.org/D54185 to other target as well, specifically:
1. make anonymous namespaces as small as possible, avoid using static inside anonymous namespaces
2. Add missing header to some files
3. GetLoadImmediateOpcodem-> getLoadImmediateOpcode
4. Fix typo
Differential Revision: https://reviews.llvm.org/D54343
llvm-svn: 347309
diff --git a/llvm/unittests/tools/llvm-exegesis/X86/AnalysisTest.cpp b/llvm/unittests/tools/llvm-exegesis/X86/AnalysisTest.cpp
index 00ac629..c893918 100644
--- a/llvm/unittests/tools/llvm-exegesis/X86/AnalysisTest.cpp
+++ b/llvm/unittests/tools/llvm-exegesis/X86/AnalysisTest.cpp
@@ -1,3 +1,12 @@
+//===-- AnalysisTest.cpp ---------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
#include "Analysis.h"
#include <cassert>
@@ -28,7 +37,7 @@
}
STI.reset(TheTarget->createMCSubtargetInfo(TT, "haswell", ""));
- // Compute the ProxResIdx of ports unes in tests.
+ // Compute the ProxResIdx of ports uses in tests.
const auto &SM = STI->getSchedModel();
for (unsigned I = 0, E = SM.getNumProcResourceKinds(); I < E; ++I) {
const std::string Name = SM.getProcResource(I)->Name;