llvm-mc: Factor getSectionData out of SwitchSection.
[oota-llvm.git] / lib / MC / MCAsmLexer.cpp
index c5365b7a9561a49888120e2bce665ee4466ef097..1e34ed6f7900b711680bdc4b2305612faf5e863b 100644 (file)
@@ -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());
+}