diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-14 02:18:40 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-14 02:18:40 +0000 |
commit | 7b7f51425e1626485f232ca57c135e30b6785be7 (patch) | |
tree | 42090b61ab3f99a0b25b15712754645046bb985a | |
parent | 7cefd80bd52f239dbb002abdc1c4a7a5f76dd47e (diff) | |
download | external_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.cpp | 5 | ||||
-rw-r--r-- | tools/llvm-mc/AsmLexer.cpp | 4 |
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); |