aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-14 02:18:40 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-14 02:18:40 +0000
commit7b7f51425e1626485f232ca57c135e30b6785be7 (patch)
tree42090b61ab3f99a0b25b15712754645046bb985a
parent7cefd80bd52f239dbb002abdc1c4a7a5f76dd47e (diff)
downloadexternal_llvm-7b7f51425e1626485f232ca57c135e30b6785be7.zip
external_llvm-7b7f51425e1626485f232ca57c135e30b6785be7.tar.gz
external_llvm-7b7f51425e1626485f232ca57c135e30b6785be7.tar.bz2
llvm-mc: Move MCAsmToken::getLoc() into MC library where it belongs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78980 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/MC/MCAsmLexer.cpp5
-rw-r--r--tools/llvm-mc/AsmLexer.cpp4
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/MC/MCAsmLexer.cpp b/lib/MC/MCAsmLexer.cpp
index c5365b7..1e34ed6 100644
--- a/lib/MC/MCAsmLexer.cpp
+++ b/lib/MC/MCAsmLexer.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/MC/MCAsmLexer.h"
+#include "llvm/Support/SourceMgr.h"
using namespace llvm;
@@ -16,3 +17,7 @@ MCAsmLexer::MCAsmLexer() : CurTok(AsmToken::Error, StringRef()) {
MCAsmLexer::~MCAsmLexer() {
}
+
+SMLoc AsmToken::getLoc() const {
+ return SMLoc::getFromPointer(Str.data());
+}
diff --git a/tools/llvm-mc/AsmLexer.cpp b/tools/llvm-mc/AsmLexer.cpp
index 5b394b6..27454ee 100644
--- a/tools/llvm-mc/AsmLexer.cpp
+++ b/tools/llvm-mc/AsmLexer.cpp
@@ -34,10 +34,6 @@ SMLoc AsmLexer::getLoc() const {
return SMLoc::getFromPointer(TokStart);
}
-SMLoc AsmToken::getLoc() const {
- return SMLoc::getFromPointer(Str.data());
-}
-
void AsmLexer::PrintMessage(SMLoc Loc, const std::string &Msg,
const char *Type) const {
SrcMgr.PrintMessage(Loc, Msg, Type);