[llvm-mca] Remove a couple of using directives and a bunch of redundant namespace llvm prefixes. NFC
llvm-svn: 344916
diff --git a/llvm/tools/llvm-mca/CodeRegion.cpp b/llvm/tools/llvm-mca/CodeRegion.cpp
index c26658a..591c45f 100644
--- a/llvm/tools/llvm-mca/CodeRegion.cpp
+++ b/llvm/tools/llvm-mca/CodeRegion.cpp
@@ -14,11 +14,9 @@
#include "CodeRegion.h"
-using namespace llvm;
-
namespace mca {
-bool CodeRegion::isLocInRange(SMLoc Loc) const {
+bool CodeRegion::isLocInRange(llvm::SMLoc Loc) const {
if (RangeEnd.isValid() && Loc.getPointer() > RangeEnd.getPointer())
return false;
if (RangeStart.isValid() && Loc.getPointer() < RangeStart.getPointer())
@@ -26,11 +24,11 @@
return true;
}
-void CodeRegions::beginRegion(StringRef Description, SMLoc Loc) {
+void CodeRegions::beginRegion(llvm::StringRef Description, llvm::SMLoc Loc) {
assert(!Regions.empty() && "Missing Default region");
const CodeRegion &CurrentRegion = *Regions.back();
if (CurrentRegion.startLoc().isValid() && !CurrentRegion.endLoc().isValid()) {
- SM.PrintMessage(Loc, SourceMgr::DK_Warning,
+ SM.PrintMessage(Loc, llvm::SourceMgr::DK_Warning,
"Ignoring invalid region start");
return;
}
@@ -41,19 +39,20 @@
addRegion(Description, Loc);
}
-void CodeRegions::endRegion(SMLoc Loc) {
+void CodeRegions::endRegion(llvm::SMLoc Loc) {
assert(!Regions.empty() && "Missing Default region");
CodeRegion &CurrentRegion = *Regions.back();
if (CurrentRegion.endLoc().isValid()) {
- SM.PrintMessage(Loc, SourceMgr::DK_Warning, "Ignoring invalid region end");
+ SM.PrintMessage(Loc, llvm::SourceMgr::DK_Warning,
+ "Ignoring invalid region end");
return;
}
CurrentRegion.setEndLocation(Loc);
}
-void CodeRegions::addInstruction(const MCInst &Instruction) {
- const SMLoc &Loc = Instruction.getLoc();
+void CodeRegions::addInstruction(const llvm::MCInst &Instruction) {
+ const llvm::SMLoc &Loc = Instruction.getLoc();
const auto It =
std::find_if(Regions.rbegin(), Regions.rend(),
[Loc](const std::unique_ptr<CodeRegion> &Region) {