no really, we don't need to copy strings around in the accessor.
authorChris Lattner <sabre@nondot.org>
Thu, 1 Apr 2010 04:53:22 +0000 (04:53 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 1 Apr 2010 04:53:22 +0000 (04:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100083 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/LLLexer.h

index 3057992231b5aa2f68903f1d433a7cb306cd4f5f..70f1cfdbfd8c3e46c17a2b22ddb322c580c8dbea 100644 (file)
@@ -55,7 +55,7 @@ namespace llvm {
     typedef SMLoc LocTy;
     LocTy getLoc() const { return SMLoc::getFromPointer(TokStart); }
     lltok::Kind getKind() const { return CurKind; }
-    const std::string getStrVal() const { return StrVal; }
+    const std::string &getStrVal() const { return StrVal; }
     const Type *getTyVal() const { return TyVal; }
     unsigned getUIntVal() const { return UIntVal; }
     const APSInt &getAPSIntVal() const { return APSIntVal; }